diff options
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, |
