Guest User

Untitled

a guest
May 22nd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. filtrarEstado(pais : Pais) : void{
  2. this.loading = true;
  3. this.estadoService.getEstadosPorPais(pais).subscribe(
  4. (data :any) => {
  5. this.estados = data.lista;
  6. this.loading = false;
  7. }
  8. );
  9. }
  10.  
  11. <mat-form-field class="formulario-full-width">
  12. <mat-select placeholder="País" name="pais"
  13. [(ngModel)]="municipioBuscar.paisId"
  14. matTooltip="Deve selecionar um país">
  15. <mat-option (blur)="filtrarEstado(0)">Nenhum</mat-option>
  16. <mat-option *ngFor="let pais of paises" [value]="pais"
  17. (blur)="filtrarEstado(pais)">{{pais.descricao}}
  18. </mat-option>
  19. </mat-select>
  20. </mat-form-field>
Add Comment
Please, Sign In to add comment