|
@@ -1,5 +1,5 @@
|
1
|
1
|
import { BeerService } from '../../providers/beer-service';
|
2
|
|
-import { Component } from '@angular/core';
|
|
2
|
+import { Component, ViewChild } from '@angular/core';
|
3
|
3
|
import { GiphyService } from '../../providers/giphy-service';
|
4
|
4
|
import { NavParams, ViewController, ToastController, NavController } from 'ionic-angular';
|
5
|
5
|
import { NgForm } from '@angular/forms';
|
|
@@ -9,6 +9,7 @@ import { BeerPage } from './beer';
|
9
|
9
|
templateUrl: './beer-modal.html'
|
10
|
10
|
})
|
11
|
11
|
export class BeerModalPage {
|
|
12
|
+ @ViewChild('name') name;
|
12
|
13
|
beer: any = {};
|
13
|
14
|
error: any;
|
14
|
15
|
|
|
@@ -42,4 +43,10 @@ export class BeerModalPage {
|
42
|
43
|
this.dismiss();
|
43
|
44
|
}, error => this.error = error)
|
44
|
45
|
}
|
|
46
|
+
|
|
47
|
+ ionViewDidLoad() {
|
|
48
|
+ setTimeout(() => {
|
|
49
|
+ this.name.setFocus();
|
|
50
|
+ },150);
|
|
51
|
+ }
|
45
|
52
|
}
|