diff options
| author | Igor Minar | 2012-03-12 23:40:19 -0700 |
|---|---|---|
| committer | Igor Minar | 2012-03-13 14:13:53 -0700 |
| commit | ac5151a469667b1cc1b5e2f96d330b71631efd0b (patch) | |
| tree | 451940a5803d72784e4e703975b28a75cf2457cd /test/directive/ngViewSpec.js | |
| parent | 63be222326f3badbb76371f82d49fed5ab9e3e65 (diff) | |
| download | angular.js-ac5151a469667b1cc1b5e2f96d330b71631efd0b.tar.bz2 | |
fix(scope): remove scope $destroy event
Diffstat (limited to 'test/directive/ngViewSpec.js')
| -rw-r--r-- | test/directive/ngViewSpec.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/directive/ngViewSpec.js b/test/directive/ngViewSpec.js index 2a4347a0..7b702e51 100644 --- a/test/directive/ngViewSpec.js +++ b/test/directive/ngViewSpec.js @@ -317,9 +317,11 @@ describe('ng-view', function() { var createCtrl = function(name) { return function($scope) { log.push('init-' + name); - $scope.$on('$destroy', function() { + var destroy = $scope.$destroy; + $scope.$destroy = function() { log.push('destroy-' + name); - }); + destroy.call($scope); + } }; }; @@ -367,7 +369,11 @@ describe('ng-view', function() { function createController(name) { return function($scope) { log.push('init-' + name); - $scope.$on('$destroy', logger('destroy-' + name)); + var destroy = $scope.$destroy; + $scope.$destroy = function() { + log.push('destroy-' + name); + destroy.call($scope); + } $scope.$on('$routeUpdate', logger('route-update')); }; } |
