Skip to content

Commit ec625da

Browse files
committed
perf($compile): use strict comparison for controller === '@'
In the DDO, controller can be '@', which means the controller name is taken from the directive attribute. This is undocumented and internally only used by ngController. There seems to be no case where converting the controller function to a string would actually be necessary. Related angular#14268
1 parent ce7f400 commit ec625da

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ng/compile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2497,7 +2497,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
24972497
};
24982498

24992499
var controller = directive.controller;
2500-
if (controller == '@') {
2500+
if (controller === '@') {
25012501
controller = attrs[directive.name];
25022502
}
25032503

0 commit comments

Comments
 (0)