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

Commit

Permalink
perf($compile): use strict comparison for controller === '@'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Narretz committed Mar 22, 2016
1 parent 2ad8a93 commit bbd3db1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ng/compile.js
Expand Up @@ -2484,7 +2484,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) {
};

var controller = directive.controller;
if (controller == '@') {
if (controller === '@') {
controller = attrs[directive.name];
}

Expand Down

0 comments on commit bbd3db1

Please sign in to comment.