From bbd3db14f857aab996ad129f2f15ca6348e9fd9f Mon Sep 17 00:00:00 2001 From: Martin Staffa Date: Fri, 18 Mar 2016 18:11:49 +0100 Subject: [PATCH] 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 --- src/ng/compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/compile.js b/src/ng/compile.js index 704dbda32b98..b5346a57025c 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -2484,7 +2484,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }; var controller = directive.controller; - if (controller == '@') { + if (controller === '@') { controller = attrs[directive.name]; }