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

Commit e72990d

Browse files
fix($compile): don't throw if controller is named
1 parent f338e96 commit e72990d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ng/compile.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
11361136
forEach(options, function(val, key) {
11371137
if (key.charAt(0) === '$') {
11381138
factory[key] = val;
1139-
controller[key] = val;
1139+
// Don't try to copy over annotations to named controller
1140+
if (isFunction(controller)) controller[key] = val;
11401141
}
11411142
});
11421143

0 commit comments

Comments
 (0)