fix(navPush): check if the NavPush page exists. (#8934)

When using the NavPush directive there isn't a way to disable the nav from trying to push.
This commit is contained in:
Manu Mtz.-Almeida
2016-11-14 16:43:26 +01:00
committed by GitHub

View File

@@ -71,7 +71,7 @@ export class NavPush {
*/
@HostListener('click')
onClick(): boolean {
if (this._nav) {
if (this._nav && this.navPush) {
this._nav.push(this.navPush, this.navParams, null);
return false;
}