diff --git a/src/Angular.js b/src/Angular.js index f1ed847f53c8..bc2ecf94dd81 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -289,7 +289,7 @@ function reverseParams(iteratorFn) { * the number string gets longer over time, and it can also overflow, where as the nextId * will grow much slower, it is a string, and it will never overflow. * - * @returns an unique alpha-numeric string + * @returns {string} an unique alpha-numeric string */ function nextUid() { var index = uid.length; @@ -1053,7 +1053,7 @@ function tryDecodeURIComponent(value) { /** * Parses an escaped url query string into key-value pairs. - * @returns Object.<(string|boolean)> + * @returns {Object.} */ function parseKeyValue(/**string*/keyValue) { var obj = {}, key_value, key; @@ -1349,9 +1349,9 @@ 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 - * @returns value as accessible by path + * @param {String} path path to traverse + * @param {boolean} [bindFnToScope=true] + * @returns {Object} value as accessible by path */ //TODO(misko): this function needs to be removed function getter(obj, path, bindFnToScope) { @@ -1376,7 +1376,7 @@ function getter(obj, path, bindFnToScope) { /** * Return the DOM siblings between the first and last node in the given array. * @param {Array} array like object - * @returns jQlite object containing the elements + * @returns {DOMElement} object containing the elements */ function getBlockElements(nodes) { var startNode = nodes[0], diff --git a/src/apis.js b/src/apis.js index c5d2b3d339dc..a6df5811c87d 100644 --- a/src/apis.js +++ b/src/apis.js @@ -49,7 +49,7 @@ HashMap.prototype = { /** * @param key - * @returns the value for the key + * @returns {Object} the value for the key */ get: function(key) { return this[hashKey(key)]; diff --git a/src/auto/injector.js b/src/auto/injector.js index a4fa35e8d5b1..f71c7b3027c8 100644 --- a/src/auto/injector.js +++ b/src/auto/injector.js @@ -168,7 +168,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 @@ -195,7 +195,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`. @@ -275,7 +275,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/minErr.js b/src/minErr.js index e42a0817a3ab..7df5fdffd4b1 100644 --- a/src/minErr.js +++ b/src/minErr.js @@ -25,7 +25,7 @@ * should all be static strings, not variables or general expressions. * * @param {string} module The namespace to use for the new minErr instance. - * @returns {function(string, string, ...): Error} instance + * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance */ function minErr(module) { diff --git a/src/ng/animate.js b/src/ng/animate.js index d90f086badb9..785d1dfa1d1f 100644 --- a/src/ng/animate.js +++ b/src/ng/animate.js @@ -49,7 +49,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) { @@ -118,7 +118,7 @@ var $AnimateProvider = ['$provide', function($provide) { * a child (if the after element is not present) * @param {DOMElement} after the sibling 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) { @@ -141,7 +141,7 @@ var $AnimateProvider = ['$provide', function($provide) { * @description Removes the element from the DOM. Once complete, the done() callback will be * fired (if provided). * @param {DOMElement} 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 {Function=} done callback function that will be called after the element has been * removed from the DOM */ leave : function(element, done) { @@ -164,7 +164,7 @@ var $AnimateProvider = ['$provide', function($provide) { * inserted into (if the after element is not present) * @param {DOMElement} after the sibling 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) { @@ -183,7 +183,7 @@ var $AnimateProvider = ['$provide', function($provide) { * @param {DOMElement} element the 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) { @@ -206,7 +206,7 @@ var $AnimateProvider = ['$provide', function($provide) { * @param {DOMElement} element the 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) { @@ -230,7 +230,7 @@ var $AnimateProvider = ['$provide', function($provide) { * removed from it * @param {string} add the CSS classes which will be added to the element * @param {string} remove 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 * CSS classes have been set on the element */ setClass : function(element, add, remove, done) { diff --git a/src/ng/browser.js b/src/ng/browser.js index 52a0b9794e6b..6bec52805722 100644 --- a/src/ng/browser.js +++ b/src/ng/browser.js @@ -245,7 +245,7 @@ function Browser(window, document, $log, $sniffer) { * Returns current * (always relative - without domain) * - * @returns {string=} current + * @returns {string} The current base href */ self.baseHref = function() { var href = baseElement.attr('href'); diff --git a/src/ng/compile.js b/src/ng/compile.js index 0265beb47250..13e79b241e57 100644 --- a/src/ng/compile.js +++ b/src/ng/compile.js @@ -440,10 +440,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. @@ -521,7 +521,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. */ @@ -868,13 +868,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=} maxPriority 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) { @@ -1118,7 +1118,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 @@ -1130,7 +1130,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * @param {Array.} postLinkFns * @param {Object} previousCompileContext Context used for previous compilation of the current * node - * @returns linkFn + * @returns {Function} linkFn */ function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn, jqCollection, originalReplaceDirective, preLinkFns, postLinkFns, @@ -1576,7 +1576,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { * * `A': attribute * * `C`: class * * `M`: comment - * @returns true if directive was added. + * @returns {boolean} true if directive was added. */ function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName, endAttrName) { diff --git a/src/ng/filter.js b/src/ng/filter.js index 5010b130561e..090b32ca6ead 100644 --- a/src/ng/filter.js +++ b/src/ng/filter.js @@ -56,7 +56,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 6394819691ef..a19f146db87f 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/interval.js b/src/ng/interval.js index 5357ac89edbf..9857860d6485 100644 --- a/src/ng/interval.js +++ b/src/ng/interval.js @@ -42,93 +42,93 @@ function $IntervalProvider() { * @returns {promise} A promise which will be notified on each iteration. * * @example - - - - -
-
- Date format:
- Current time is: -
- Blood 1 : {{blood_1}} - Blood 2 : {{blood_2}} - - - -
-
- -
-
+ * + * + * + * + *
+ *
+ * Date format:
+ * Current time is: + *
+ * Blood 1 : {{blood_1}} + * Blood 2 : {{blood_2}} + * + * + * + *
+ *
+ * + *
+ *
*/ function interval(fn, delay, count, invokeApply) { var setInterval = $window.setInterval, diff --git a/src/ng/q.js b/src/ng/q.js index e7ff26ef4411..eb3b2beda80a 100644 --- a/src/ng/q.js +++ b/src/ng/q.js @@ -181,7 +181,7 @@ function $QProvider() { /** * Constructs a promise manager. * - * @param {function(function)} nextTick Function for executing functions in the next turn. + * @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 eb1dade2d927..4878c3ec42a4 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -394,7 +394,7 @@ function $RootScopeProvider(){ * ``` * * - * @param {string|Function(scope)} obj Evaluated as {@link guide/expression expression}. The + * @param {string|function(scope)} 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#$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 6ccf6a5d2a7d..6b7fbcce0bfc 100644 --- a/src/ngAnimate/animate.js +++ b/src/ngAnimate/animate.js @@ -567,7 +567,7 @@ angular.module('ngAnimate', ['ng']) * removed from it * @param {string} add the CSS classes which will be added to the element * @param {string} remove 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 * CSS classes have been set on the element */ setClass : function(element, add, remove, doneCallback) { @@ -583,7 +583,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 {DOMElement=} element If provided then the element will be used to represent the enable/disable operation * @return {boolean} Current animation state. * * @description diff --git a/src/ngRoute/route.js b/src/ngRoute/route.js index 687e85305821..e09e74db5f84 100644 --- a/src/ngRoute/route.js +++ b/src/ngRoute/route.js @@ -552,7 +552,7 @@ function $RouteProvider(){ /** - * @returns the current active route, by matching it against the URL + * @returns {Object} the current active route, by matching it against the URL */ function parseRoute() { // Match a route @@ -570,7 +570,7 @@ function $RouteProvider(){ } /** - * @returns interpolation of the redirect path with the parameters + * @returns {string} interpolation of the redirect path with the parameters */ function interpolate(string, params) { var result = []; diff --git a/src/ngSanitize/sanitize.js b/src/ngSanitize/sanitize.js index a522672197bd..35dc8f100bec 100644 --- a/src/ngSanitize/sanitize.js +++ b/src/ngSanitize/sanitize.js @@ -394,7 +394,7 @@ function decodeEntities(value) { * resulting string can be safely inserted into attribute or * element text. * @param value - * @returns escaped text + * @returns {string} escaped text */ function encodeEntities(value) { return value.