diff options
| author | deboer | 2013-02-08 20:00:05 +0000 | 
|---|---|---|
| committer | Igor Minar | 2013-02-14 15:36:03 -0800 | 
| commit | 9b7c1d0f7ce442d4ad2ec587e66d2d335e64fa4e (patch) | |
| tree | a809d99cc7962c1abcb2afe63280ec6448f4e8c1 /src/ng/directive/ngSwitch.js | |
| parent | 5548328b67e99cdacc0292481fc9c1e3cbc52fca (diff) | |
| download | angular.js-9b7c1d0f7ce442d4ad2ec587e66d2d335e64fa4e.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/ngSwitch.js')
| -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, | 
