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

Commit bbd3db1

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 #14268
1 parent 2ad8a93 commit bbd3db1

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)