diff --git a/js/angular/directive/navView.js b/js/angular/directive/navView.js index fa2a2405d69..91c347c64d1 100644 --- a/js/angular/directive/navView.js +++ b/js/angular/directive/navView.js @@ -129,7 +129,7 @@ function( $ionicViewService, $state, $compile, $controller, $animate) { // to derive our own qualified view name, then hang our own details // off the DOM so child directives can find it. var parent = element.parent().inheritedData('$uiView'); - if (name.indexOf('@') < 0) name = name + '@' + (parent ? parent.state.name : ''); + if (name.indexOf('@') < 0) name = name + '@' + ((parent && parent.state) ? parent.state.name : ''); var view = { name: name, state: null }; element.data('$uiView', view);