fix(viewController): use $watch instead of $observe

This commit is contained in:
Adam Bradley
2014-11-13 15:05:15 -06:00
parent ed8bd94fc6
commit b75bd9d8c8
2 changed files with 9 additions and 9 deletions

View File

@@ -142,7 +142,7 @@ describe('ionView directive', function() {
}));
it('should only observe hideNavBar attr after afterEnter and before beforeLeave', inject(function($rootScope) {
var el = setup('hide-nav-bar="{{ hide }}"', {hide: false});
var el = setup('hide-nav-bar="hide"', {hide: false});
$rootScope.$broadcast('$ionicView.beforeEnter', {});
var spy = el.data('$ionNavViewController').showBar;
expect(spy).not.toHaveBeenCalled();
@@ -165,7 +165,7 @@ describe('ionView directive', function() {
}));
it('should only observe hideBackButton attr after afterEnter and before beforeLeave', inject(function($rootScope) {
var el = setup('hide-back-button="{{ hide }}"', {hide: false});
var el = setup('hide-back-button="hide"', {hide: false});
$rootScope.$broadcast('$ionicView.beforeEnter', {});
var spy = el.data('$ionNavViewController').showBackButton;
expect(spy).not.toHaveBeenCalled();