mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 12:29:55 +08:00
Update view.js
This commit is contained in:
@ -1,6 +1,5 @@
|
|||||||
import {NgElement, Component, Template, Parent} from 'angular2/angular2'
|
import {NgElement, Component, Template, Parent} from 'angular2/angular2'
|
||||||
import {Toolbar} from 'ionic2/components/toolbar/toolbar'
|
import {Toolbar} from 'ionic2/components/toolbar/toolbar'
|
||||||
import {NavView} from 'ionic2/components/nav-view/nav-view'
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-view',
|
selector: 'ion-view',
|
||||||
@ -21,13 +20,8 @@ import {NavView} from 'ionic2/components/nav-view/nav-view'
|
|||||||
directives: [Toolbar]
|
directives: [Toolbar]
|
||||||
})
|
})
|
||||||
export class View {
|
export class View {
|
||||||
constructor(@NgElement() ele:NgElement, @Parent() nav: NavView) {
|
constructor(@NgElement() ele:NgElement) {
|
||||||
ele.domElement.classList.add('pane')
|
ele.domElement.classList.add('pane')
|
||||||
console.log('View constructed', ele.domElement, nav);
|
console.log('View constructed', ele.domElement, nav);
|
||||||
|
|
||||||
// TODO: Figure out better way to do this
|
|
||||||
if(nav) {
|
|
||||||
nav.push(this, true)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user