mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
make @param type and description non-optional
This commit is contained in:
parent
28e72cbe6b
commit
a6978b201b
3 changed files with 21 additions and 19 deletions
|
|
@ -246,15 +246,15 @@ var TAG = {
|
|||
param: function(doc, name, value){
|
||||
doc.param = doc.param || [];
|
||||
doc.paramRest = doc.paramRest || [];
|
||||
var match = value.match(/^({([^\s=]+)(=)?}\s*)?(([^\s=]+)|\[(\S+)=([^\]]+)\])\s+(.*)/);
|
||||
// 1 2 23 3 1 45 5 6 6 7 7 4 8 8
|
||||
var match = value.match(/^{([^}=]+)(=)?}\s+(([^\s=]+)|\[(\S+)=([^\]]+)\])\s+(.*)/);
|
||||
// 1 12 2 34 4 5 5 6 6 3 7 7
|
||||
if (match) {
|
||||
var param = {
|
||||
type: match[2],
|
||||
name: match[6] || match[5],
|
||||
optional: !!match[3],
|
||||
'default':match[7],
|
||||
description:markdownNoP(value.replace(match[0], match[8]))
|
||||
type: match[1],
|
||||
name: match[5] || match[4],
|
||||
optional: !!match[2],
|
||||
'default':match[6],
|
||||
description:markdownNoP(value.replace(match[0], match[7]))
|
||||
};
|
||||
doc.param.push(param);
|
||||
if (!doc.paramFirst) {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ function Browser(location, document, head, XHR, $log) {
|
|||
* @methodOf angular.service.$browser
|
||||
*
|
||||
* @param {number} interval How often should browser call poll functions (ms)
|
||||
* @param {function} setTimeout
|
||||
* @param {function} setTimeout Reference to a real or fake `setTimeout` function.
|
||||
*
|
||||
* @description
|
||||
* Configures the poller to run in the specified intervals, using the specified
|
||||
|
|
@ -251,11 +251,12 @@ function Browser(location, document, head, XHR, $log) {
|
|||
* @ngdoc method
|
||||
* @name angular.service.$browser#hover
|
||||
* @methodOf angular.service.$browser
|
||||
*
|
||||
* @param {function(Object, boolean)} listener
|
||||
*
|
||||
*
|
||||
* @description
|
||||
* Set hover listener - function that will be called when hover event occurs.
|
||||
* Set hover listener.
|
||||
*
|
||||
* @param {function(Object, boolean)} listener Function that will be called when hover event
|
||||
* occurs.
|
||||
*/
|
||||
self.hover = function(listener) { hoverListener = listener; };
|
||||
|
||||
|
|
|
|||
|
|
@ -621,7 +621,8 @@ angularServiceInject('$route', function(location) {
|
|||
* @methodOf angular.service.$route
|
||||
*
|
||||
* @param {string} path Route path (matched against $location.hash)
|
||||
* @param {Object} params
|
||||
* @param {Object} params Mapping information to be assigned to `$route.current` on route
|
||||
* match.
|
||||
* @returns {Object} route object
|
||||
*
|
||||
* @description
|
||||
|
|
@ -993,10 +994,10 @@ angularServiceInject('$cookieStore', function($store) {
|
|||
* @description
|
||||
* Returns the value of given cookie key
|
||||
*
|
||||
* @param {string} key
|
||||
* @returns {Object} Deserialized cookie value
|
||||
* @param {string} key Id to use for lookup.
|
||||
* @returns {Object} Deserialized cookie value.
|
||||
*/
|
||||
get: function(/**string*/key) {
|
||||
get: function(key) {
|
||||
return fromJson($store[key]);
|
||||
},
|
||||
|
||||
|
|
@ -1008,8 +1009,8 @@ angularServiceInject('$cookieStore', function($store) {
|
|||
* @description
|
||||
* Sets a value for given cookie key
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {Object} value
|
||||
* @param {string} key Id for the `value`.
|
||||
* @param {Object} value Value to be stored.
|
||||
*/
|
||||
put: function(key, value) {
|
||||
$store[key] = toJson(value);
|
||||
|
|
@ -1023,7 +1024,7 @@ angularServiceInject('$cookieStore', function($store) {
|
|||
* @description
|
||||
* Remove given cookie
|
||||
*
|
||||
* @param {string} key
|
||||
* @param {string} key Id of the key-value pair to delete.
|
||||
*/
|
||||
remove: function(key) {
|
||||
delete $store[key];
|
||||
|
|
|
|||
Loading…
Reference in a new issue