|
@@ -36,14 +36,10 @@ export class BeerModalPage {
|
36
|
36
|
this.beerService.save(form).subscribe(result => {
|
37
|
37
|
let toast = this.toastCtrl.create({
|
38
|
38
|
message: 'Beer "' + form.name + '" ' + ((update) ? 'updated' : 'added') + '.',
|
39
|
|
- duration: 2000,
|
40
|
|
- position: 'top'
|
|
39
|
+ duration: 2000
|
41
|
40
|
});
|
42
|
41
|
toast.present();
|
43
|
|
- // this should work, but doesn't refresh model
|
44
|
|
- //this.viewCtrl.dismiss();
|
45
|
|
- // this refreshes model
|
46
|
|
- this.navCtrl.push(BeerPage);
|
|
42
|
+ this.dismiss();
|
47
|
43
|
}, error => this.error = error)
|
48
|
44
|
}
|
49
|
45
|
}
|