@@ -342,158 +342,3 @@ yarn grunt build
342342
343343To view the docs, see [ Running a Local Development Web Server] ( #local-server ) .
344344
345- ### Writing jsdoc
346-
347- The ngdoc utility has basic support for many of the standard jsdoc directives. But in particular it
348- is interested in the following block tags:
349-
350- - ` @name name ` - the name of the ngdoc document
351- - ` @param {type} name description ` - describes a parameter of a function
352- - ` @returns {type} description ` - describes what a function returns
353- - ` @requires ` - normally indicates that a JavaScript module is required; in an Angular service it is
354- used to describe what other services this service relies on
355- - ` @property ` - describes a property of an object
356- - ` @description ` - used to provide a description of a component in markdown
357- - ` @link ` - specifies a link to a URL or a type in the API reference.
358- Links to the API have the following structure:
359- - the module namespace, followed by ` . ` (optional, default ` ng ` )
360- - the ` @ngdoc ` type (see below), followed by ` : ` (optional, automatically inferred)
361- - the name
362- - the method, property, or anchor (optional)
363- - the display name
364-
365- For example: ` {@link ng.type:$rootScope.Scope#$new Scope.$new()} ` .
366-
367- - ` @example ` - specifies an example. This can be a simple code block, or a
368- [ runnable example] ( #the-example-tag ) .
369- - ` @deprecated ` - specifies that the following code is deprecated and should not be used.
370- In The AngularTS docs, there are two specific patterns which can be used to further describe
371- the deprecation: ` sinceVersion="<version>" ` and ` removeVersion="<version>" `
372-
373- The ` type ` in ` @param ` and ` @returns ` must be wrapped in ` {} ` curly braces, e.g. ` {Object|Array} ` .
374- Parameters can be made optional by _ either_ appending a ` = ` to the type, e.g. ` {Object=} ` , _ or_ by
375- putting the ` [name] ` in square brackets.
376- Default values are only possible with the second syntax by appending ` =<value> ` to the parameter
377- name, e.g. ` @param {boolean} [ownPropsOnly=false] ` .
378-
379- Descriptions can contain markdown formatting.
380-
381- #### AngularTS-specific jsdoc directives
382-
383- In addition to the standard jsdoc tags, there are a number that are specific to the Angular
384- code-base:
385-
386- - ` @ngdoc ` - specifies the type of thing being documented. See below for more detail.
387- - ` @eventType emit|broadcast ` - specifies whether the event is emitted or broadcast
388- - ` @usage ` - shows how to use a ` function ` or ` directive ` . Is usually automatically generated.
389- - ` @knownIssue ` - adds info about known quirks, problems, or limitations with the API, and possibly,
390- workarounds. This section is not for bugs.
391-
392- The following are specific to directives:
393-
394- - ` @animations ` - specifies the animations a directive supports
395- - ` @multiElement ` - specifies if a directive can span over multiple elements
396- - ` @priority ` - specifies a directive's priority
397- - ` @restrict ` - is extracted to show the usage of a directive. For example, for [ E] lement,
398- [ A] ttribute, and [ C] lass, use ` @restrict ECA `
399- - ` @scope ` - specifies that a directive will create a new scope
400-
401- ### The ` @ngdoc ` Directive
402-
403- This directive helps to specify the template used to render the item being documented. For instance,
404- a directive would have different properties to a filter and so would be documented differently. The
405- commonly used types are:
406-
407- - ` overview ` - a general page (guide, api index)
408- - ` provider ` - AngularTS provider, such as ` $compileProvider ` or ` $httpProvider ` .
409- - ` service ` - injectable AngularTS service, such as ` $compile ` or ` $http ` .
410- - ` object ` - well defined object (often exposed as a service)
411- - ` function ` - function that will be available to other methods (such as a helper function within
412- the ng module)
413- - ` method ` - method on an object/service/controller
414- - ` property ` - property on an object/service/controller
415- - ` event ` - AngularTS event that will propagate through the ` $scope ` tree.
416- - ` directive ` - AngularTS directive
417- - ` filter ` - AngularTS filter
418- - ` error ` - minErr error description
419-
420- ### General documentation with Markdown
421-
422- Any text in tags can contain markdown syntax for formatting. Generally, you can use any markdown
423- feature.
424-
425- #### Headings
426-
427- Only use _ h2_ headings and lower, as the page title is set in _ h1_ . Also make sure you follow the
428- heading hierarchy. This ensures correct table of contents are created.
429-
430- #### Code blocks
431-
432- In line code can be specified by enclosing the code in back-ticks (\` ).
433- A block of multi-line code can be enclosed in triple back-ticks (\`\`\` ) but it is formatted better
434- if it is enclosed in < ; pre> ; ...< ; /pre> ; tags and the code lines themselves are indented.
435-
436- ### Writing runnable (live) examples and e2e tests
437-
438- It is possible to embed examples in the documentation along with appropriate e2e tests. These
439- examples and scenarios will be converted to runnable code within the documentation. So it is
440- important that they work correctly. To ensure this, all these e2e scenarios are run as part of the
441- continuous integration tests.
442-
443- If you are adding an example with an e2e test, you should [ run the test locally] ( #e2e-tests ) first
444- to ensure it passes. You can change ` it(...) ` to ` it(...) ` to run only your test,
445- but make sure you change it back to ` it(...) ` before committing.
446-
447- #### The ` <example> ` tag
448-
449- This tag identifies a block of HTML that will define a runnable example. It can take the following
450- attributes:
451-
452- - ` animations ` - if set to ` true ` then this example uses ngAnimate.
453- - ` deps ` - Semicolon-separated list of additional angular module files to be loaded,
454- e.g. ` angular-animate.js `
455- - ` name ` - every example should have a name. It should start with the component, e.g directive name,
456- and not contain whitespace
457- - ` module ` - the name of the app module as defined in the example's JavaScript
458-
459- Within this tag we provide ` <file> ` tags that specify what files contain the example code.
460-
461- ```
462- <example
463- module="angularAppModule"
464- name="exampleName"
465- deps="angular-animate.js;angular-route.js"
466- animations="true">
467- ...
468- <file name="index.html">...</file>
469- <file name="script.js">...</file>
470- <file name="animations.css">...</file>
471- <file name="protractor.js">...</file>
472- ...
473- </example>
474- ```
475-
476- You can see an example of a well-defined example [ in the ` ngRepeat ` documentation] [ code.ngRepeat-example ] .
477-
478- [ closing-issues ] : https://help.github.com/articles/closing-issues-via-commit-messages/
479- [ Closure guide to i18n changes ] : https://github.com/google/closure-library/wiki/Internationalization-%28i18n%29-changes-in-Closure-Library
480- [ code.badrestrict ] : https://github.com/angular/angular.js/blob/202f1809ad14827a6ac6a125157c605d65e0b551/src/ng/compile.js#L1107-L1110
481- [ code.debugInfoEnabled ] : https://github.com/angular/angular.js/blob/32fbb2e78f53d765fbb170f7cf99e42e072d363b/src/ng/compile.js#L1378-L1413
482- [ code.html5Mode ] : https://github.com/angular/angular.js/blob/202f1809ad14827a6ac6a125157c605d65e0b551/src/ng/location.js#L752-L797
483- [ code.minErr ] : https://github.com/angular/angular.js/blob/202f1809ad14827a6ac6a125157c605d65e0b551/src/minErr.js#L53-L113
484- [ code.ngRepeat-example ] : https://github.com/angular/angular.js/blob/0822d34b10ea0371c260c80a1486a4d508ea5a91/src/ng/directive/ngRepeat.js#L249-L340
485- [ commit-message-format ] : https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/edit#
486- [ Common Locale Data Repository (CLDR) ] : http://cldr.unicode.org
487- [ corporate-cla ] : http://code.google.com/legal/corporate-cla-v1.0.html
488- [ dgeni ] : https://github.com/angular/dgeni
489- [ docs.badrestrict ] : docs/content/error/$compile/badrestrict.ngdoc
490- [ docs.provider ] : https://code.angularjs.org/snapshot/docs/api/auto/service/$provide#provider
491- [ git-revert ] : https://git-scm.com/docs/git-revert
492- [ git-setup ] : https://help.github.com/articles/set-up-git
493- [ github-issues ] : https://github.com/angular/angular.js/issues
494- [ github ] : https://github.com/angular/angular.js
495- [ js-style-guide ] : https://google.github.io/styleguide/javascriptguide.xml
496- [ karma-browserstack ] : https://github.com/karma-runner/karma-browserstack-launcher
497- [ karma-saucelabs ] : https://github.com/karma-runner/karma-sauce-launcher
498- [ unit-testing ] : https://docs.angularjs.org/guide/unit-testing
499- [ yarn-install ] : https://yarnpkg.com/en/docs/install
0 commit comments