fix(view): do not register abstract states

Closes #2642
This commit is contained in:
Adam Bradley
2014-12-07 01:31:07 -06:00
parent cf2556b789
commit 37dd84c6de
2 changed files with 24 additions and 2 deletions

View File

@@ -284,7 +284,7 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
// create an element from the viewLocals template
ele = $ionicViewSwitcher.createViewEle(viewLocals);
if (this.isAbstractEle(ele)) {
if (this.isAbstractEle(ele, viewLocals)) {
console.log('VIEW', 'abstractView', DIRECTION_NONE, viewHistory.currentView);
return {
action: 'abstractView',
@@ -651,7 +651,10 @@ function($rootScope, $state, $location, $window, $timeout, $ionicViewSwitcher, $
return nextViewOptions;
},
isAbstractEle: function(ele) {
isAbstractEle: function(ele, viewLocals) {
if (viewLocals && viewLocals.$$state && viewLocals.$$state.self.abstract) {
return true;
}
return !!(ele && (isAbstractTag(ele) || isAbstractTag(ele.children())));
},