-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(slides): add navigation to the intro test
- Loading branch information
1 parent
80cbd32
commit ebeb940
Showing
2 changed files
with
73 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,44 @@ | ||
import {App} from '../../../../../ionic/ionic'; | ||
import {App, Page, NavController} from 'ionic/ionic'; | ||
|
||
|
||
@App({ | ||
templateUrl: 'main.html' | ||
template: '<ion-nav [root]="rootPage"></ion-nav>' | ||
}) | ||
class MyApp { | ||
constructor() { | ||
this.rootPage = IntroPage; | ||
} | ||
} | ||
|
||
@Page({ | ||
templateUrl: 'main.html' | ||
}) | ||
class IntroPage { | ||
constructor(nav: NavController) { | ||
this.nav = nav; | ||
} | ||
|
||
onSlideChanged(slider) { | ||
console.log('Slide changed', slider); | ||
} | ||
|
||
skip() { | ||
this.nav.push(MainPage); | ||
} | ||
} | ||
|
||
@Page({ | ||
template: ` | ||
<ion-navbar *navbar> | ||
<ion-title>Slides</ion-title> | ||
</ion-navbar> | ||
<ion-content padding> | ||
<h1>Another Page</h1> | ||
</ion-content> | ||
` | ||
}) | ||
class MainPage { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters