`,
directives: [View, Content]
})
class Tab1Page1 {
// TODO change to 'Nav' injection when we're allowed to inject a tab as a nav.
constructor(nav: Tab) {
this.nav = nav;
}
next() {
this.nav.push(Tab1Page2)
}
}
@Component({ selector: 't1p2' })
@NgView({
template: `
Tab 1 Page 2.
`,
directives: [View, Content]
})
class Tab1Page2 {
// TODO change to 'Nav' injection when we're allowed to inject a tab as a nav.
constructor(nav: Tab) {
this.nav = nav;
}
pop() { this.nav.pop(); }
}
//
// tab 2
//
@Component({ selector: 't2p1' })
@NgView({
template: `
Left aside for Tab 2 Page 1
Tab 2 Page 1.
I have got an aside on the left.
`,
directives: [View, Aside, Content]
})
class Tab2Page1 {
// TODO change to 'Nav' injection when we're allowed to inject a tab as a nav.
constructor(nav: Tab) {
this.nav = nav
}
next() {
this.nav.push(Tab2Page2)
}
}
@Component({ selector: 't2p2' })
@NgView({
template: `
Left aside for Tab 2 Page 2
Nested Tab 1, static content
Nested Tab 2, static content
`,
directives: [View, Aside, Tabs, Tab, Content]
})
class Tab2Page2 {
// TODO change to 'Nav' injection when we're allowed to inject a tab as a nav.
constructor(nav: Tab) {
this.nav = nav
}
pop() { this.nav.pop() }
}