diff --git a/src/Angular.js b/src/Angular.js index c3e326d756fe..100007396e9c 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -457,7 +457,7 @@ function identity($) {return $;} identity.$inject = []; -function valueFn(value) {return function() {return value;};} +function valueFn(value) {return function valueRef() {return value;};} function hasCustomToString(obj) { return isFunction(obj.toString) && obj.toString !== toString; diff --git a/src/ng/compile.js b/src/ng/compile.js index 18ecce99dc92..704dbda32b98 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -1215,7 +1215,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { var SIMPLE_ATTR_NAME = /^\w/; var specialAttrHolder = document.createElement('div'); - var Attributes = function(element, attributesToCopy) { + function Attributes(element, attributesToCopy) { if (attributesToCopy) { var keys = Object.keys(attributesToCopy); var i, l, key; @@ -1229,7 +1229,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } this.$$element = element; - }; + } Attributes.prototype = { /** @@ -1718,8 +1718,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) { - - var boundTranscludeFn = function(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) { + function boundTranscludeFn(transcludedScope, cloneFn, controllers, futureParentElement, containingScope) { if (!transcludedScope) { transcludedScope = scope.$new(false, containingScope); @@ -1731,7 +1730,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { transcludeControllers: controllers, futureParentElement: futureParentElement }); - }; + } // We need to attach the transclusion slots onto the `boundTranscludeFn` // so that they are available inside the `controllersBoundTransclude` function @@ -1896,7 +1895,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * @returns {Function} */ function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) { - return function(scope, element, attrs, controllers, transcludeFn) { + return function groupedElementsLink(scope, element, attrs, controllers, transcludeFn) { element = groupScan(element[0], attrStart, attrEnd); return linkFn(scope, element, attrs, controllers, transcludeFn); }; @@ -1919,7 +1918,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { if (eager) { return compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); } - return function() { + return function lazyCompilation() { if (!compiled) { compiled = compile($compileNodes, transcludeFn, maxPriority, ignoreDirective, previousCompileContext); @@ -2985,7 +2984,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // only occurs for isolate scopes and new scopes with controllerAs. function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) { var removeWatchCollection = []; - forEach(bindings, function(definition, scopeName) { + forEach(bindings, function initializeBinding(definition, scopeName) { var attrName = definition.attrName, optional = definition.optional, mode = definition.mode, // @, =, or & @@ -3027,7 +3026,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { if (parentGet.literal) { compare = equals; } else { - compare = function(a, b) { return a === b || (a !== a && b !== b); }; + compare = function simpleCompare(a, b) { return a === b || (a !== a && b !== b); }; } parentSet = parentGet.assign || function() { // reset the change, or we will throw this exception on every $digest diff --git a/src/ng/controller.js b/src/ng/controller.js index 8cc077960e2f..b240d4554b07 100644 --- a/src/ng/controller.js +++ b/src/ng/controller.js @@ -92,7 +92,7 @@ function $ControllerProvider() { * It's just a simple call to {@link auto.$injector $injector}, but extracted into * a service, so that one can override this service with [BC version](https://gist.github.com/1649788). */ - return function(expression, locals, later, ident) { + return function $controller(expression, locals, later, ident) { // PRIVATE API: // param `later` --- indicates that the controller's constructor is invoked at a later time. // If true, $controller will allocate the object with the correct @@ -143,7 +143,7 @@ function $ControllerProvider() { } var instantiate; - return instantiate = extend(function() { + return instantiate = extend(function $controllerInit() { var result = $injector.invoke(expression, instance, locals, constructor); if (result !== instance && (isObject(result) || isFunction(result))) { instance = result;