mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 13:32:54 +08:00
chore(build): rename ionic directory to src and update all references in the build process.
This commit is contained in:
64
src/components/slides/test/intro/index.ts
Normal file
64
src/components/slides/test/intro/index.ts
Normal file
@ -0,0 +1,64 @@
|
||||
import {App, Page, NavController} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
template: '<ion-nav [root]="rootPage"></ion-nav>'
|
||||
})
|
||||
class MyApp {
|
||||
rootPage;
|
||||
|
||||
constructor() {
|
||||
this.rootPage = IntroPage;
|
||||
}
|
||||
}
|
||||
|
||||
@Page({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class IntroPage {
|
||||
continueText: string = "Skip";
|
||||
startingIndex: number = 1;
|
||||
mySlideOptions;
|
||||
|
||||
constructor(private nav: NavController) {
|
||||
this.mySlideOptions = {
|
||||
paginationClickable: true,
|
||||
lazyLoading: true,
|
||||
preloadImages: false,
|
||||
initialSlide: this.startingIndex
|
||||
};
|
||||
}
|
||||
|
||||
onSlideChanged(slider) {
|
||||
console.log("Slide changed", slider);
|
||||
}
|
||||
|
||||
onSlideChangeStart(slider) {
|
||||
console.log("Slide change start", slider);
|
||||
slider.isEnd ? this.continueText = "Continue" : this.continueText = "Skip";
|
||||
}
|
||||
|
||||
onSlideMove(slider) {
|
||||
console.log("Slide move", 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 {
|
||||
|
||||
}
|
Reference in New Issue
Block a user