mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-17 03:01:06 +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){
|
param: function(doc, name, value){
|
||||||
doc.param = doc.param || [];
|
doc.param = doc.param || [];
|
||||||
doc.paramRest = doc.paramRest || [];
|
doc.paramRest = doc.paramRest || [];
|
||||||
var match = value.match(/^({([^\s=]+)(=)?}\s*)?(([^\s=]+)|\[(\S+)=([^\]]+)\])\s+(.*)/);
|
var match = value.match(/^{([^}=]+)(=)?}\s+(([^\s=]+)|\[(\S+)=([^\]]+)\])\s+(.*)/);
|
||||||
// 1 2 23 3 1 45 5 6 6 7 7 4 8 8
|
// 1 12 2 34 4 5 5 6 6 3 7 7
|
||||||
if (match) {
|
if (match) {
|
||||||
var param = {
|
var param = {
|
||||||
type: match[2],
|
type: match[1],
|
||||||
name: match[6] || match[5],
|
name: match[5] || match[4],
|
||||||
optional: !!match[3],
|
optional: !!match[2],
|
||||||
'default':match[7],
|
'default':match[6],
|
||||||
description:markdownNoP(value.replace(match[0], match[8]))
|
description:markdownNoP(value.replace(match[0], match[7]))
|
||||||
};
|
};
|
||||||
doc.param.push(param);
|
doc.param.push(param);
|
||||||
if (!doc.paramFirst) {
|
if (!doc.paramFirst) {
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ function Browser(location, document, head, XHR, $log) {
|
||||||
* @methodOf angular.service.$browser
|
* @methodOf angular.service.$browser
|
||||||
*
|
*
|
||||||
* @param {number} interval How often should browser call poll functions (ms)
|
* @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
|
* @description
|
||||||
* Configures the poller to run in the specified intervals, using the specified
|
* 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
|
* @ngdoc method
|
||||||
* @name angular.service.$browser#hover
|
* @name angular.service.$browser#hover
|
||||||
* @methodOf angular.service.$browser
|
* @methodOf angular.service.$browser
|
||||||
*
|
*
|
||||||
* @param {function(Object, boolean)} listener
|
|
||||||
*
|
|
||||||
* @description
|
* @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; };
|
self.hover = function(listener) { hoverListener = listener; };
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -621,7 +621,8 @@ angularServiceInject('$route', function(location) {
|
||||||
* @methodOf angular.service.$route
|
* @methodOf angular.service.$route
|
||||||
*
|
*
|
||||||
* @param {string} path Route path (matched against $location.hash)
|
* @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
|
* @returns {Object} route object
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
|
|
@ -993,10 +994,10 @@ angularServiceInject('$cookieStore', function($store) {
|
||||||
* @description
|
* @description
|
||||||
* Returns the value of given cookie key
|
* Returns the value of given cookie key
|
||||||
*
|
*
|
||||||
* @param {string} key
|
* @param {string} key Id to use for lookup.
|
||||||
* @returns {Object} Deserialized cookie value
|
* @returns {Object} Deserialized cookie value.
|
||||||
*/
|
*/
|
||||||
get: function(/**string*/key) {
|
get: function(key) {
|
||||||
return fromJson($store[key]);
|
return fromJson($store[key]);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -1008,8 +1009,8 @@ angularServiceInject('$cookieStore', function($store) {
|
||||||
* @description
|
* @description
|
||||||
* Sets a value for given cookie key
|
* Sets a value for given cookie key
|
||||||
*
|
*
|
||||||
* @param {string} key
|
* @param {string} key Id for the `value`.
|
||||||
* @param {Object} value
|
* @param {Object} value Value to be stored.
|
||||||
*/
|
*/
|
||||||
put: function(key, value) {
|
put: function(key, value) {
|
||||||
$store[key] = toJson(value);
|
$store[key] = toJson(value);
|
||||||
|
|
@ -1023,7 +1024,7 @@ angularServiceInject('$cookieStore', function($store) {
|
||||||
* @description
|
* @description
|
||||||
* Remove given cookie
|
* Remove given cookie
|
||||||
*
|
*
|
||||||
* @param {string} key
|
* @param {string} key Id of the key-value pair to delete.
|
||||||
*/
|
*/
|
||||||
remove: function(key) {
|
remove: function(key) {
|
||||||
delete $store[key];
|
delete $store[key];
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue