diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts index 1a11bf757b..c9d948cf1d 100644 --- a/ionic/components/nav/nav.ts +++ b/ionic/components/nav/nav.ts @@ -106,11 +106,8 @@ import {ViewController} from './view-controller'; template: '
' }) export class Nav extends NavController { - - /** - * @private - */ - @Input() root: Type; + private _root: Type; + private _hasInit: boolean = false; constructor( @Optional() hostNavCtrl: NavController, @@ -134,15 +131,32 @@ export class Nav extends NavController { } } + /** + * @input {Page} The Page component to load as the root page within this nav. + */ + @Input() + get root(): Type { + return this._root; + } + set root(page: Type) { + this._root = page; + + if (this._hasInit) { + this.setRoot(page); + } + } + /** * @private */ ngOnInit() { - if (this.root) { - if (typeof this.root !== 'function') { + this._hasInit = true; + + if (this._root) { + if (typeof this._root !== 'function') { throw 'The [root] property in