|
@@ -11,13 +11,12 @@ export class HomePage {
|
11
|
11
|
@ViewChild(Slides) slides: Slides;
|
12
|
12
|
|
13
|
13
|
currentCard = {
|
14
|
|
- front: "Hello0",
|
|
14
|
+ front: "Hello",
|
15
|
15
|
back: "World!"
|
16
|
16
|
};
|
17
|
17
|
cardSupply: any;
|
18
|
18
|
prov: any;
|
19
|
|
- currentIndex = 0;
|
20
|
|
-
|
|
19
|
+ currentIndex = 1;
|
21
|
20
|
constructor(public navCtrl: NavController, supply: FlashCardsProvider) {
|
22
|
21
|
this.prov = supply;
|
23
|
22
|
this.cardSupply = supply.allCards();
|
|
@@ -32,17 +31,21 @@ export class HomePage {
|
32
|
31
|
|
33
|
32
|
nextSlide() {
|
34
|
33
|
// ready for more functionality
|
|
34
|
+ this.currentIndex = this.slides.getActiveIndex() + 1;
|
35
|
35
|
}
|
36
|
36
|
|
37
|
37
|
prevSlide() {
|
38
|
38
|
// ready for more functionality
|
|
39
|
+ this.currentIndex = this.slides.getActiveIndex() + 1;
|
39
|
40
|
}
|
40
|
41
|
|
41
|
42
|
reset() {
|
42
|
43
|
this.navCtrl.setRoot(this.navCtrl.getActive().component);
|
|
44
|
+ this.currentIndex = 1;
|
43
|
45
|
}
|
44
|
46
|
next() {
|
45
|
47
|
let idx = this.slides.getActiveIndex() + 1;
|
|
48
|
+ this.currentIndex= idx;
|
46
|
49
|
this.slides.slideTo(idx, 500);
|
47
|
50
|
}
|
48
|
51
|
|