diff --git a/src/Angular.js b/src/Angular.js index e32c3739bbb7..91ab5e8f474e 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -1192,7 +1192,7 @@ function angularInit(element, bootstrap) { * They must use {@link api/ng.directive:ngApp ngApp}. * * @param {Element} element DOM element which is the root of angular application. - * @param {Array=} modules an array of modules to load into the application. + * @param {Array.=} modules an array of modules to load into the application. * Each item in the array should be the name of a predefined module or a (DI annotated) * function that will be invoked by the injector as a run block. * See: {@link angular.module modules} @@ -1306,7 +1306,7 @@ function assertNotHasOwnProperty(name, context) { * Return the value accessible from the object by path. Any undefined traversals are ignored * @param {Object} obj starting object * @param {string} path path to traverse - * @param {boolean=true} bindFnToScope + * @param {boolean} bindFnToScope defaults to true * @returns value as accessible by path */ //TODO(misko): this function needs to be removed diff --git a/src/auto/injector.js b/src/auto/injector.js index 4eabc2fc4d78..7e6897450372 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -169,7 +169,7 @@ function annotate(fn) { * @description * Invoke the method and supply the method arguments from the `$injector`. * - * @param {!function} fn The function to invoke. Function parameters are injected according to the + * @param {!function()} fn The function to invoke. Function parameters are injected according to the * {@link guide/di $inject Annotation} rules. * @param {Object=} self The `this` for the invoked method. * @param {Object=} locals Optional object. If preset then any argument names are read from this @@ -198,7 +198,7 @@ function annotate(fn) { * operator and supplies all of the arguments to the constructor function as specified by the * constructor annotation. * - * @param {function} Type Annotated constructor function. + * @param {function()} Type Annotated constructor function. * @param {Object=} locals Optional object. If preset then any argument names are read from this * object first, before the `$injector` is consulted. * @returns {Object} new instance of `Type`. @@ -279,7 +279,7 @@ function annotate(fn) { * ).toEqual(['$compile', '$rootScope']); * * - * @param {function|Array.} fn Function for which dependent service names need to + * @param {function()|Array.} fn Function for which dependent service names need to * be retrieved as described above. * * @returns {Array.} The names of the services which the function requires. diff --git a/src/loader.js b/src/loader.js index 787fcbfa6a77..3c9e91e3293a 100644 --- a/src/loader.js +++ b/src/loader.js @@ -277,8 +277,8 @@ function setupModuleLoader(window) { * Use this method to register work which should be performed when the injector is done * loading all modules. */ - run: function(block) { - runBlocks.push(block); + run: function(initializationFn) { + runBlocks.push(initializationFn); return this; } }; diff --git a/src/ng/animate.js b/src/ng/animate.js index b662d9c18cdf..9c2e3d0a7ec7 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -50,7 +50,7 @@ var $AnimateProvider = ['$provide', function($provide) { * * * @param {string} name The name of the animation. - * @param {function} factory The factory function that will be executed to return the animation + * @param {function()} factory The factory function that will be executed to return the animation * object. */ this.register = function(name, factory) { @@ -90,12 +90,12 @@ var $AnimateProvider = ['$provide', function($provide) { * @function * @description Inserts the element into the DOM either after the `after` element or within * the `parent` element. Once complete, the done() callback will be fired (if provided). - * @param {jQuery/jqLite element} element the element which will be inserted into the DOM - * @param {jQuery/jqLite element} parent the parent element which will append the element as + * @param {Object} element the jQuery/jqLite element which will be inserted into the DOM + * @param {Object} parent the parent jQuery/jqLite element which will append the element as * a child (if the after element is not present) - * @param {jQuery/jqLite element} after the sibling element which will append the element + * @param {Object} after the sibling jQuery/jqLite element which will append the element * after itself - * @param {function=} done callback function that will be called after the element has been + * @param {function()=} done callback function that will be called after the element has been * inserted into the DOM */ enter : function(element, parent, after, done) { @@ -118,8 +118,8 @@ var $AnimateProvider = ['$provide', function($provide) { * @function * @description Removes the element from the DOM. Once complete, the done() callback will be * fired (if provided). - * @param {jQuery/jqLite element} element the element which will be removed from the DOM - * @param {function=} done callback function that will be called after the element has been + * @param {Object} element the jQuery/jqLite element which will be removed from the DOM + * @param {function()=} done callback function that will be called after the element has been * removed from the DOM */ leave : function(element, done) { @@ -137,13 +137,13 @@ var $AnimateProvider = ['$provide', function($provide) { * either after the `after` element or inside of the `parent` element. Once complete, the * done() callback will be fired (if provided). * - * @param {jQuery/jqLite element} element the element which will be moved around within the + * @param {Object} element the jQuery/jqLite element which will be moved around within the * DOM - * @param {jQuery/jqLite element} parent the parent element where the element will be + * @param {Object} parent the parent jQuery/jqLite element where the element will be * inserted into (if the after element is not present) - * @param {jQuery/jqLite element} after the sibling element where the element will be + * @param {Object} after the sibling jQuery/jqLite element where the element will be * positioned next to - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {function()=} done the callback function (if provided) that will be fired after the * element has been moved to its new position */ move : function(element, parent, after, done) { @@ -160,10 +160,10 @@ var $AnimateProvider = ['$provide', function($provide) { * @function * @description Adds the provided className CSS class value to the provided element. Once * complete, the done() callback will be fired (if provided). - * @param {jQuery/jqLite element} element the element which will have the className value + * @param {Object} element the jQuery/jqLite element which will have the className value * added to it * @param {string} className the CSS class which will be added to the element - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {function()=} done the callback function (if provided) that will be fired after the * className value has been added to the element */ addClass : function(element, className, done) { @@ -184,10 +184,10 @@ var $AnimateProvider = ['$provide', function($provide) { * @function * @description Removes the provided className CSS class value from the provided element. * Once complete, the done() callback will be fired (if provided). - * @param {jQuery/jqLite element} element the element which will have the className value + * @param {Object} element the jQuery/jqLite element which will have the className value * removed from it * @param {string} className the CSS class which will be removed from the element - * @param {function=} done the callback function (if provided) that will be fired after the + * @param {function()=} done the callback function (if provided) that will be fired after the * className value has been removed from the element */ removeClass : function(element, className, done) { diff --git a/src/ng/browser.js b/src/ng/browser.js index 5e52b82807a9..f010d759350b 100644 --- a/src/ng/browser.js +++ b/src/ng/browser.js @@ -248,7 +248,7 @@ function Browser(window, document, $log, $sniffer) { * Returns current * (always relative - without domain) * - * @returns {string=} current + * @returns {string} current */ self.baseHref = function() { var href = baseElement.attr('href'); diff --git a/src/ng/compile.js b/src/ng/compile.js index 0af76a758caa..89a84e1ba45e 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -436,10 +436,10 @@ * * * @param {string|DOMElement} element Element or HTML string to compile into a template function. - * @param {function(angular.Scope[, cloneAttachFn]} transclude function available to directives. + * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives. * @param {number} maxPriority only apply directives lower then given priority (Only effects the * root element(s), not their children) - * @returns {function(scope[, cloneAttachFn])} a link function which is used to bind template + * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template * (a DOM element/tree) to a scope. Where: * * * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to. @@ -517,7 +517,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * @param {string|Object} name Name of the directive in camel-case (i.e. ngBind which * will match as ng-bind), or an object map of directives where the keys are the * names and the values are the factories. - * @param {function|Array} directiveFactory An injectable directive factory function. See + * @param {function()|Array} directiveFactory An injectable directive factory function. See * {@link guide/directive} for more info. * @returns {ng.$compileProvider} Self for chaining. */ @@ -860,13 +860,13 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * function, which is the a linking function for the node. * * @param {NodeList} nodeList an array of nodes or NodeList to compile - * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the * scope argument is auto-generated to the new child of the transcluded parent scope. * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then * the rootElement must be set the jqLite collection of the compile root. This is * needed so that the jqLite collection items can be replaced with widgets. * @param {number=} max directive priority - * @returns {?function} A composite linking function of all of the matched directives or null. + * @returns {?function()} A composite linking function of all of the matched directives or null. */ function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective, previousCompileContext) { @@ -1109,7 +1109,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * this needs to be pre-sorted by priority order. * @param {Node} compileNode The raw DOM node to apply the compile functions to * @param {Object} templateAttrs The shared attribute function - * @param {function(angular.Scope[, cloneAttachFn]} transcludeFn A linking function, where the + * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the * scope argument is auto-generated to the new * child of the transcluded parent scope. * @param {JQLite} jqCollection If we are working on the root of the compile tree then this diff --git a/src/ng/filter.js b/src/ng/filter.js index 15180edb4ffd..9ba4d255d13e 100644 --- a/src/ng/filter.js +++ b/src/ng/filter.js @@ -57,7 +57,7 @@ * Register filter factory function. * * @param {String} name Name of the filter. - * @param {function} fn The filter factory function which is injectable. + * @param {function()} fn The filter factory function which is injectable. */ diff --git a/src/ng/http.js b/src/ng/http.js index e7bbb8bc6e93..6643124d44e6 100644 --- a/src/ng/http.js +++ b/src/ng/http.js @@ -63,7 +63,7 @@ function headersGetter(headers) { * * @param {*} data Data to transform. * @param {function(string=)} headers Http headers getter fn. - * @param {(function|Array.)} fns Function or an array of functions. + * @param {function()|Array.} fns Function or an array of functions. * @returns {*} Transformed data. */ function transformData(data, headers, fns) { diff --git a/src/ng/location.js b/src/ng/location.js index 402db3cf04d5..1f9a66cfc66f 100644 --- a/src/ng/location.js +++ b/src/ng/location.js @@ -410,7 +410,7 @@ LocationHashbangInHtml5Url.prototype = * hash object. Hash object may contain an array of values, which will be decoded as duplicates in * the url. * - * @param {(string|Array)=} paramValue If `search` is a string, then `paramValue` will override only a + * @param {(string|Array.)=} paramValue If `search` is a string, then `paramValue` will override only a * single search parameter. If `paramValue` is an array, it will set the parameter as a * comma-separated value. If `paramValue` is `null`, the parameter will be deleted. * diff --git a/src/ng/q.js b/src/ng/q.js index c1f6712aacae..3de8ee1efd03 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -181,8 +181,8 @@ function $QProvider() { /** * Constructs a promise manager. * - * @param {function(function)} nextTick Function for executing functions in the next turn. - * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for + * @param {function(function())} nextTick Function for executing functions in the next turn. + * @param {function(...[*])} exceptionHandler Function into which unexpected exceptions are passed for * debugging purposes. * @returns {object} Promise manager. */ diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index a56abc5c6784..793d6e74cb6b 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -395,7 +395,7 @@ function $RootScopeProvider(){ * * * - * @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The + * @param {string|function(Object)} obj Evaluated as {@link guide/expression expression}. The * expression value should evaluate to an object or an array which is observed on each * {@link ng.$rootScope.Scope#methods_$digest $digest} cycle. Any shallow change within the * collection will trigger a call to the `listener`. diff --git a/src/ngAnimate/animate.js b/src/ngAnimate/animate.js index aeb6e32e9361..b47d5604c229 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -360,9 +360,9 @@ angular.module('ngAnimate', ['ng']) * | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | * | 10. The doneCallback() callback is fired (if provided) | class="my-animation" | * - * @param {jQuery/jqLite element} element the element that will be the focus of the enter animation - * @param {jQuery/jqLite element} parentElement the parent element of the element that will be the focus of the enter animation - * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the enter animation + * @param {Object} element the jQuery/jqLite element that will be the focus of the enter animation + * @param {Object} parentElement the parent jQuery/jqLite element of the element that will be the focus of the enter animation + * @param {Object} afterElement the sibling jQuery/jqLite element (which is the previous element) of the element that will be the focus of the enter animation * @param {function()=} doneCallback the callback function that will be called once the animation is complete */ enter : function(element, parentElement, afterElement, doneCallback) { @@ -398,7 +398,7 @@ angular.module('ngAnimate', ['ng']) * | 9. The element is removed from the DOM | ... | * | 10. The doneCallback() callback is fired (if provided) | ... | * - * @param {jQuery/jqLite element} element the element that will be the focus of the leave animation + * @param {Object} element the jQuery/jqLite element that will be the focus of the leave animation * @param {function()=} doneCallback the callback function that will be called once the animation is complete */ leave : function(element, doneCallback) { @@ -437,9 +437,9 @@ angular.module('ngAnimate', ['ng']) * | 9. The animation ends and all generated CSS classes are removed from the element | class="my-animation" | * | 10. The doneCallback() callback is fired (if provided) | class="my-animation" | * - * @param {jQuery/jqLite element} element the element that will be the focus of the move animation - * @param {jQuery/jqLite element} parentElement the parentElement element of the element that will be the focus of the move animation - * @param {jQuery/jqLite element} afterElement the sibling element (which is the previous element) of the element that will be the focus of the move animation + * @param {Object} element the jQuery/jqLite element that will be the focus of the move animation + * @param {Object} parentElement the parent jQuery/jqLite element of the element that will be the focus of the move animation + * @param {Object} afterElement the sibling jQuery/jqLite element (which is the previous element) of the element that will be the focus of the move animation * @param {function()=} doneCallback the callback function that will be called once the animation is complete */ move : function(element, parentElement, afterElement, doneCallback) { @@ -477,7 +477,7 @@ angular.module('ngAnimate', ['ng']) * | 9. The super class is kept on the element | class="my-animation super" | * | 10. The doneCallback() callback is fired (if provided) | class="my-animation super" | * - * @param {jQuery/jqLite element} element the element that will be animated + * @param {Object} element the jQuery/jqLite element that will be animated * @param {string} className the CSS class that will be added to the element and then animated * @param {function()=} doneCallback the callback function that will be called once the animation is complete */ @@ -513,7 +513,7 @@ angular.module('ngAnimate', ['ng']) * | 9. The doneCallback() callback is fired (if provided) | class="my-animation" | * * - * @param {jQuery/jqLite element} element the element that will be animated + * @param {Object} element the jQuery/jqLite element that will be animated * @param {string} className the CSS class that will be animated and then removed from the element * @param {function()=} doneCallback the callback function that will be called once the animation is complete */ @@ -530,7 +530,7 @@ angular.module('ngAnimate', ['ng']) * @function * * @param {boolean=} value If provided then set the animation on or off. - * @param {jQuery/jqLite element=} element If provided then the element will be used to represent the enable/disable operation + * @param {Object=} element Options jQuery/jqLite element to represent the enable/disable operation * @return {boolean} Current animation state. * * @description