Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 9b7c1d0

Browse files
deboerIgorMinar
deboer
authored andcommitted
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.
1 parent 5548328 commit 9b7c1d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ng/directive/ngSwitch.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@ var NG_SWITCH = 'ng-switch';
6363
var ngSwitchDirective = valueFn({
6464
restrict: 'EA',
6565
require: 'ngSwitch',
66-
controller: function ngSwitchController() {
66+
// asks for $scope to fool the BC controller module
67+
controller: ['$scope', function ngSwitchController() {
6768
this.cases = {};
68-
},
69+
}],
6970
link: function(scope, element, attr, ctrl) {
7071
var watchExpr = attr.ngSwitch || attr.on,
7172
selectedTransclude,

0 commit comments

Comments
 (0)