Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select class="form-control" formControlName="materials" (change)="onChangeMaterial($event,m.data)">
- <option value="" disabled="true" [selected]="true">Seleccione una opción</option>
- <option *ngFor="let m of material" [id]="m.data" [value]="m.id">{{m.label}}</option>
- </select>
- onChangeMaterial($event, $alert) {
- console.log($event);
- this.materialVis = 'shown';
- this.tipoEmba = 'shown';
- this.docServ.package($event).subscribe(packages => {
- this.package = packages;
- }, (err) => {
- console.error(err);
- });
- if($alert == 1){
- this.addToast({
- title: 'Sustancia controlada',
- msg: 'El material que eligió es una sustancia controlada',
- timeout: 5000,
- theme: 'default',
- position: 'bottom-right',
- type: 'warning'
- });
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement