mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-17 03:01:06 +00:00
doc(ngdoc): clean up doc generation and add missing documentation links
This commit is contained in:
parent
a3a37c2063
commit
f0be543614
5 changed files with 58 additions and 23 deletions
|
|
@ -726,7 +726,7 @@ function scenarios(docs){
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////
|
||||||
function metadata(docs){
|
function metadata(docs){
|
||||||
var words = [];
|
var pages = [];
|
||||||
docs.forEach(function(doc){
|
docs.forEach(function(doc){
|
||||||
var path = (doc.name || '').split(/(\.|\:\s+)/);
|
var path = (doc.name || '').split(/(\.|\:\s+)/);
|
||||||
for ( var i = 1; i < path.length; i++) {
|
for ( var i = 1; i < path.length; i++) {
|
||||||
|
|
@ -738,7 +738,7 @@ function metadata(docs){
|
||||||
shortName = 'input [' + shortName + ']';
|
shortName = 'input [' + shortName + ']';
|
||||||
}
|
}
|
||||||
|
|
||||||
words.push({
|
pages.push({
|
||||||
section: doc.section,
|
section: doc.section,
|
||||||
id: doc.id,
|
id: doc.id,
|
||||||
name: title(doc.name),
|
name: title(doc.name),
|
||||||
|
|
@ -747,27 +747,12 @@ function metadata(docs){
|
||||||
keywords:doc.keywords()
|
keywords:doc.keywords()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
words.sort(keywordSort);
|
pages.sort(keywordSort);
|
||||||
return words;
|
return pages;
|
||||||
}
|
}
|
||||||
|
|
||||||
var KEYWORD_PRIORITY = {
|
var KEYWORD_PRIORITY = {
|
||||||
'.index': 1,
|
'.index': 1,
|
||||||
'.guide': 2,
|
|
||||||
'.angular': 7,
|
|
||||||
'.angular.Module': 7,
|
|
||||||
'.angular.module': 8,
|
|
||||||
'.angular.module.ng': 2,
|
|
||||||
'.angular.module.AUTO': 1,
|
|
||||||
'.angular.mock': 9,
|
|
||||||
'.angular.module.ng.$filter': 7,
|
|
||||||
'.angular.module.ng.$rootScope.Scope': 7,
|
|
||||||
'.angular.module.ng': 7,
|
|
||||||
'.angular.mock': 8,
|
|
||||||
'.angular.directive': 6,
|
|
||||||
'.angular.inputType': 6,
|
|
||||||
'.angular.widget': 6,
|
|
||||||
'.angular.module.ngMock': 8,
|
|
||||||
'.overview': 1,
|
'.overview': 1,
|
||||||
'.bootstrap': 2,
|
'.bootstrap': 2,
|
||||||
'.mvc': 3,
|
'.mvc': 3,
|
||||||
|
|
|
||||||
|
|
@ -135,7 +135,7 @@
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* For information on how the compiler works, see the
|
* For information on how the compiler works, see the
|
||||||
* {@link guide/dev_guide.compiler Angular HTML Compiler} section of the Developer Guide.
|
* {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -145,7 +145,20 @@
|
||||||
* @function
|
* @function
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc function
|
||||||
|
* @name angular.module.ng.$compileProvider#directive
|
||||||
|
* @methodOf angular.module.ng.$compileProvider
|
||||||
|
* @function
|
||||||
*
|
*
|
||||||
|
* @description
|
||||||
|
* Register a new directive with compiler
|
||||||
|
*
|
||||||
|
* @param {string} name name of the directive.
|
||||||
|
* @param {function} directiveFactory An injectable directive factory function.
|
||||||
|
* @returns {angular.module.ng.$compileProvider} Self for chaining.
|
||||||
*/
|
*/
|
||||||
$CompileProvider.$inject = ['$provide'];
|
$CompileProvider.$inject = ['$provide'];
|
||||||
function $CompileProvider($provide) {
|
function $CompileProvider($provide) {
|
||||||
|
|
@ -1045,6 +1058,43 @@ function directiveNormalize(name) {
|
||||||
return camelCase(name.replace(PREFIX_REGEXP, ''));
|
return camelCase(name.replace(PREFIX_REGEXP, ''));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc object
|
||||||
|
* @name angular.module.ng.$compile.directive.Attributes
|
||||||
|
* @description
|
||||||
|
*
|
||||||
|
* A shared object between directive compile / linking functions which contains normalized DOM element
|
||||||
|
* attributes. The the values reflect current binding state `{{ }}`. The normalization is needed
|
||||||
|
* since all of these are treated as equivalent in Angular:
|
||||||
|
*
|
||||||
|
* <span ng:bind="a" ng-bind="a" data-ng-bind="a" x-ng-bind="a">
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc property
|
||||||
|
* @name angular.module.ng.$compile.directive.Attributes#$attr
|
||||||
|
* @propertyOf angular.module.ng.$compile.directive.Attributes
|
||||||
|
* @returns {object} A map of DOM element attribute names to the normalized name. This is
|
||||||
|
* needed to do reverse lookup from normalized name back to actual name.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ngdoc function
|
||||||
|
* @name angular.module.ng.$compile.directive.Attributes#$set
|
||||||
|
* @methodOf angular.module.ng.$compile.directive.Attributes
|
||||||
|
* @function
|
||||||
|
*
|
||||||
|
* @description
|
||||||
|
* Set DOM element attribute value.
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* @param {string} name Normalized element attribute name of the property to modify. The name is
|
||||||
|
* revers translated using the {@link angular.module.ng.$compile.directive.Attributes#$attr $attr}
|
||||||
|
* property to the original name.
|
||||||
|
* @param {string} value Value to set the attribute to.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -270,7 +270,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+
|
||||||
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-1200)
|
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-1200)
|
||||||
*
|
*
|
||||||
* `format` string can also be one of the following predefined
|
* `format` string can also be one of the following predefined
|
||||||
* {@link guide/dev_guide.i18n localizable formats}:
|
* {@link guide/i18n localizable formats}:
|
||||||
*
|
*
|
||||||
* * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
|
* * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale
|
||||||
* (e.g. Sep 3, 2010 12:05:08 pm)
|
* (e.g. Sep 3, 2010 12:05:08 pm)
|
||||||
|
|
|
||||||
|
|
@ -814,7 +814,7 @@ function getterFn(path, csp) {
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
*
|
*
|
||||||
* Converts Angular {@link guid/expression expression} into a function.
|
* Converts Angular {@link guide/expression expression} into a function.
|
||||||
*
|
*
|
||||||
* <pre>
|
* <pre>
|
||||||
* var getter = $parse('user.name');
|
* var getter = $parse('user.name');
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ function $RootScopeProvider(){
|
||||||
* the scope and its child scopes to be permanently detached from the parent and thus stop
|
* the scope and its child scopes to be permanently detached from the parent and thus stop
|
||||||
* participating in model change detection and listener notification by invoking.
|
* participating in model change detection and listener notification by invoking.
|
||||||
*
|
*
|
||||||
* @params {boolean} isolate if true then the scoped does not prototypically inherit from the
|
* @param {boolean} isolate if true then the scoped does not prototypically inherit from the
|
||||||
* parent scope. The scope is isolated, as it can not se parent scope properties.
|
* parent scope. The scope is isolated, as it can not se parent scope properties.
|
||||||
* When creating widgets it is useful for the widget to not accidently read parent
|
* When creating widgets it is useful for the widget to not accidently read parent
|
||||||
* state.
|
* state.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue