doc(ngdoc): clean up doc generation and add missing documentation links

This commit is contained in:
Misko Hevery 2012-03-01 11:28:50 -08:00
parent a3a37c2063
commit f0be543614
5 changed files with 58 additions and 23 deletions

View file

@ -726,7 +726,7 @@ function scenarios(docs){
//////////////////////////////////////////////////////////
function metadata(docs){
var words = [];
var pages = [];
docs.forEach(function(doc){
var path = (doc.name || '').split(/(\.|\:\s+)/);
for ( var i = 1; i < path.length; i++) {
@ -738,7 +738,7 @@ function metadata(docs){
shortName = 'input [' + shortName + ']';
}
words.push({
pages.push({
section: doc.section,
id: doc.id,
name: title(doc.name),
@ -747,27 +747,12 @@ function metadata(docs){
keywords:doc.keywords()
});
});
words.sort(keywordSort);
return words;
pages.sort(keywordSort);
return pages;
}
var KEYWORD_PRIORITY = {
'.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,
'.bootstrap': 2,
'.mvc': 3,

View file

@ -135,7 +135,7 @@
*
*
* 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
*
* @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'];
function $CompileProvider($provide) {
@ -1045,6 +1058,43 @@ function directiveNormalize(name) {
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.
*/
/**

View file

@ -270,7 +270,7 @@ var DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+
* * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-1200)
*
* `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
* (e.g. Sep 3, 2010 12:05:08 pm)

View file

@ -814,7 +814,7 @@ function getterFn(path, csp) {
*
* @description
*
* Converts Angular {@link guid/expression expression} into a function.
* Converts Angular {@link guide/expression expression} into a function.
*
* <pre>
* var getter = $parse('user.name');

View file

@ -165,7 +165,7 @@ function $RootScopeProvider(){
* 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.
*
* @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.
* When creating widgets it is useful for the widget to not accidently read parent
* state.