Skip to content

Commit

Permalink
I fixed the error of not having declared the variable typeSearchOptio…
Browse files Browse the repository at this point in the history
…nHotel in the class of the Form
  • Loading branch information
aline-borges committed Sep 17, 2020
1 parent 5ebad33 commit d95cb70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Criar um site moderno, com uma boa usabilidade que consuma o JSON exposto pela A
![ordenation-limitedByStars](https://github.com/aline-borges/challenge-alpha-angular/blob/master/src/assets/images/hurb-project-screen-hotel-order-by-stars.png?raw=true)

| Limitação: Mostra o número de hóteis/pacotes limitados por estrelas. |
| Card do Hotél: Mostra a foto, o nome, a localização, o número de estrelas, o valor da diária, tags e botão de visualizar o hotel|
| Card do Hotel: Mostra a foto, o nome, a localização, o número de estrelas, o valor da diária, tags e botão de visualizar o hotel|

## Desenvolvimento no Servidor
Para rodar esse projeto na sua maquina, após clonar o repositório, digite ng serve e navegue para o link http://localhost:4200/. Pode digitar ng serve --open e a aplicação abre automaticamente. A aplicação faz o reload automático a cada mudança realizada no código.
Expand Down
1 change: 1 addition & 0 deletions src/app/components/form/form.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class FormComponent implements OnInit {
valueSlider: string
value: string
typeSearchOption: string
typeSearchOptionHotel: string
packageImage: Array<any>
smallDescription: string
dados: Array<any>
Expand Down
3 changes: 3 additions & 0 deletions src/app/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Component, OnInit, EventEmitter, Output } from '@angular/core';
export class HeaderComponent implements OnInit {

@Output() sendTypeSearch = new EventEmitter();
@Output() sendTypeSearchHotel = new EventEmitter();

hotel: any
package: any
Expand All @@ -24,12 +25,14 @@ export class HeaderComponent implements OnInit {
this.hotel.classList.add('underlinedMenuSelection');
this.package.classList.remove('underlinedMenuSelection');
this.sendTypeSearch.emit('hotel');
this.sendTypeSearchHotel.emit('hotel');
});

this.package.addEventListener('click', () => {
this.package.classList.add('underlinedMenuSelection');
this.hotel.classList.remove('underlinedMenuSelection');
this.sendTypeSearch.emit('offer');
this.sendTypeSearchHotel.emit('hotel');
});

}
Expand Down

0 comments on commit d95cb70

Please sign in to comment.