mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
Add view to nav test
This commit is contained in:
@ -1,2 +1,4 @@
|
|||||||
<ion-nav>
|
<ion-nav>
|
||||||
|
<ion-view>
|
||||||
|
</ion-view>
|
||||||
</ion-nav>
|
</ion-nav>
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import {bootstrap} from 'angular2/core';
|
import {bootstrap} from 'angular2/core';
|
||||||
import {Component, Template} from 'angular2/angular2';
|
import {Component, Template} from 'angular2/angular2';
|
||||||
import {NavView} from 'ionic2/components/nav-view/nav-view';
|
import {NavView} from 'ionic2/components/nav-view/nav-view';
|
||||||
|
import {View} from 'ionic2/components/view/view';
|
||||||
|
|
||||||
@Component({ selector: '[ion-app]' })
|
@Component({ selector: '[ion-app]' })
|
||||||
@Template({
|
@Template({
|
||||||
directives: [NavView],
|
directives: [NavView, View],
|
||||||
url: 'main.html'
|
url: 'main.html'
|
||||||
})
|
})
|
||||||
class IonicApp {
|
class IonicApp {
|
||||||
|
@ -22,5 +22,6 @@ import {Toolbar} from 'ionic2/components/toolbar/toolbar'
|
|||||||
export class View {
|
export class View {
|
||||||
constructor(@NgElement() ele:NgElement) {
|
constructor(@NgElement() ele:NgElement) {
|
||||||
ele.domElement.classList.add('pane')
|
ele.domElement.classList.add('pane')
|
||||||
|
console.log('View constructed', ele.domElement);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user