Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <select class="form-control" formControlName="materials" (change)="onChangeMaterial($event,m.data)">
  2. <option value="" disabled="true" [selected]="true">Seleccione una opción</option>
  3. <option *ngFor="let m of material" [id]="m.data" [value]="m.id">{{m.label}}</option>
  4. </select>
  5.  
  6.  
  7. onChangeMaterial($event, $alert) {
  8. console.log($event);
  9. this.materialVis = 'shown';
  10. this.tipoEmba = 'shown';
  11. this.docServ.package($event).subscribe(packages => {
  12. this.package = packages;
  13. }, (err) => {
  14. console.error(err);
  15. });
  16.  
  17. if($alert == 1){
  18. this.addToast({
  19. title: 'Sustancia controlada',
  20. msg: 'El material que eligió es una sustancia controlada',
  21. timeout: 5000,
  22. theme: 'default',
  23. position: 'bottom-right',
  24. type: 'warning'
  25. });
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement