Skip to content

Commit a7fc24d

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 aa077e8 commit a7fc24d

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
@@ -2484,7 +2484,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
24842484
};
24852485

24862486
var controller = directive.controller;
2487-
if (controller == '@') {
2487+
if (controller === '@') {
24882488
controller = attrs[directive.name];
24892489
}
24902490

0 commit comments

Comments
 (0)