diff options
| author | deboer | 2013-02-08 20:00:05 +0000 | 
|---|---|---|
| committer | Igor Minar | 2013-02-14 15:38:20 -0800 | 
| commit | ce3b6164328771a7bcb05e4c1b20f0bbfc4ac440 (patch) | |
| tree | f3db87d9ebe2e40c188eb07b6411f9c23a48e1b4 /src/ng/directive | |
| parent | 54a761905d0bc570cc35966aebfa77d42bbd4245 (diff) | |
| download | angular.js-ce3b6164328771a7bcb05e4c1b20f0bbfc4ac440.tar.bz2 | |
fix(ngSwitch): make ngSwitch compatible with controller BC module
add a $scope to the ngSwitch's controller to fool the controller
BC (backwards compatibility) module used by DFA.
Diffstat (limited to 'src/ng/directive')
| -rw-r--r-- | src/ng/directive/ngSwitch.js | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ng/directive/ngSwitch.js b/src/ng/directive/ngSwitch.js index 24c6047a..7b698107 100644 --- a/src/ng/directive/ngSwitch.js +++ b/src/ng/directive/ngSwitch.js @@ -63,9 +63,10 @@ var NG_SWITCH = 'ng-switch';  var ngSwitchDirective = valueFn({    restrict: 'EA',    require: 'ngSwitch', -  controller: function ngSwitchController() { +  // asks for $scope to fool the BC controller module +  controller: ['$scope', function ngSwitchController() {      this.cases = {}; -  }, +  }],    link: function(scope, element, attr, ctrl) {      var watchExpr = attr.ngSwitch || attr.on,          selectedTransclude,  | 
