Files
ionic-framework/ionic/components/split-view/test/settings/groups/privacy.js
2015-05-04 09:17:17 -05:00

75 lines
1.2 KiB
JavaScript

import {Component, View} from 'angular2/angular2'
import {NavPane} from 'ionic/ionic'
@Component({ selector: 'privacy-settings' })
@View({
template: `
<ion-view nav-title="Privacy">
Privacy
<button class="button button-primary" (click)="next()">
Next
</button>
</ion-view>`,
directives: []
})
export class PrivacyPage {
constructor(navPane: NavPane) {
this.navPane = navPane
}
next() {
this.navPane.push(PrivacyP1)
}
}
@Component({ selector: 'privp1' })
@View({
template: `
<ion-view nav-title="Privacy Page 1">
This is page 1
<br/>
<button class="button button-primary" (click)="next()">
Next
</button>
<br/>
<button class="button" (click)="pop()">
Back
</button>
</ion-view>
`,
directives: []
})
class PrivacyP1 {
constructor(navPane: NavPane) {
this.navPane = navPane
}
next() {
this.navPane.push(PrivacyP2)
}
pop() {
this.navPane.pop()
}
}
@Component({ selector: 'privp2' })
@View({
template: `
<ion-view nav-title="Privacy Page 2">
Page 2 here
<br/>
<button class="button" (click)="pop()">
Back
</button>
<br/>
</ion-view>
`,
directives: []
})
class PrivacyP2 {
constructor(navPane: NavPane) {
this.navPane = navPane
}
pop() {
this.navPane.pop()
}
}