"Fossies" - the Fresh Open Source Software Archive

Member "angular-1.8.2/docs/partials/api.html" (21 Oct 2020, 11954 Bytes) of package /linux/www/angular-1.8.2.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) HTML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 <a href='https://github.com/angular/angular.js/edit/v1.8.x/docs/content/api/index.ngdoc?message=docs(API Reference)%3A%20describe%20your%20change...#L1' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a>
    2 
    3 
    4 <h1 id="angularjs-api-docs">AngularJS API Docs</h1>
    5 <div class="alert alert-warning">
    6 <strong>On July 1, 2018 AngularJS entered a 3 year Long Term Support period:</strong> <a href="misc/version-support-status">Find out more</a>.
    7 </div>
    8 
    9 <h2 id="welcome-to-the-angularjs-api-docs-page-">Welcome to the AngularJS API docs page.</h2>
   10 <p>These pages contain the AngularJS reference materials for version <strong ng-bind="version"></strong>.</p>
   11 <p>The documentation is organized into <strong><a href="guide/module">modules</a></strong> which contain various components of an AngularJS application.
   12 These components are <a href="guide/directive">directives</a>, <a href="guide/services">services</a>, <a href="guide/filter">filters</a>, <a href="guide/providers">providers</a>, <a href="guide/templates">templates</a>, global APIs, and testing mocks.</p>
   13 <p>There is also a <a href="guide/index">guide</a> with articles on various topics, and a list of external resources.</p>
   14 <div class="alert alert-info">
   15 <strong>AngularJS Prefixes <code>$</code> and <code>$$</code></strong>:
   16 
   17 To prevent accidental name collisions with your code,
   18 AngularJS prefixes names of public objects with <code>$</code> and names of private objects with <code>$$</code>.
   19 Please do not use the <code>$</code> or <code>$$</code> prefix in your code.
   20 </div>
   21 
   22 <h2 id="angularjs-modules">AngularJS Modules</h2>
   23 <h2 id="-link-ng-ng-core-module-"><a href="api/ng">ng (core module)</a></h2>
   24 <p>This module is provided by default and contains the core components of AngularJS.</p>
   25 <table class="definition-table spaced">
   26   <tr>
   27     <td><a href="api/ng#directive">Directives</a></td>
   28     <td>
   29       <p>
   30         This is the core collection of directives you would use in your template code to build an AngularJS application.
   31       </p>
   32 
   33       <p>
   34         Some examples include:
   35           <a href="api/ng/directive/ngClick">ngClick</a>,
   36           <a href="api/ng/directive/ngInclude">ngInclude</a>,
   37           <a href="api/ng/directive/ngRepeat">ngRepeat</a>,
   38           etc… <br />
   39       </p>
   40     </td>
   41   </tr>
   42   <tr>
   43     <td>
   44       <a href="api/ng#service">Services / Factories</a>
   45     </td>
   46     <td>
   47       <p>
   48         This is the core collection of services which are used within the DI of your application.
   49       </p>
   50       <p>
   51         Some examples include:
   52           <a href="api/ng/service/$compile">$compile</a>,
   53           <a href="api/ng/service/$http">$http</a>,
   54           <a href="api/ng/service/$location">$location</a>,
   55           etc…
   56       <p>
   57     </td>
   58   </tr>
   59   <tr>
   60     <td>
   61       <a href="api/ng#filter">Filters</a>
   62     </td>
   63     <td>
   64       <p>
   65         The core filters available in the ng module are used to transform template data before it is rendered within directives and expressions.
   66       </p>
   67       <p>
   68         Some examples include:
   69           <a href="api/ng/filter/filter">filter</a>,
   70           <a href="api/ng/filter/date">date</a>,
   71           <a href="api/ng/filter/currency">currency</a>,
   72           <a href="api/ng/filter/lowercase">lowercase</a>,
   73           <a href="api/ng/filter/uppercase">uppercase</a>,
   74             etc...
   75       </p>
   76     </td>
   77   </tr>
   78   <tr>
   79     <td>
   80       <a href="api/ng#function">Global APIs</a>
   81     </td>
   82     <td>
   83       <p>
   84         The core global API functions are attached to the <code>angular</code> object. These core functions are useful for low level JavaScript operations within your application.
   85       </p>
   86       <p>
   87         Some examples include:
   88         <a href="api/ng/function/angular.copy">angular.copy()</a>,
   89         <a href="api/ng/function/angular.equals">angular.equals()</a>,
   90         <a href="api/ng/function/angular.element">angular.element()</a>,
   91           etc...
   92       </p>
   93     </td>
   94   </tr>
   95 </table>
   96 
   97 
   98 <h2 id="-link-ngroute-ngroute-"><a href="api/ngRoute">ngRoute</a></h2>
   99 <p>Use ngRoute to enable URL routing to your application. The ngRoute module supports URL management via both hashbang and HTML5 pushState.</p>
  100 <div class="alert alert-info">Include the <strong>angular-route.js</strong> file and set <strong>ngRoute</strong> as a dependency for this to work in your application.</div>
  101 
  102 <table class="definition-table spaced">
  103   <tr>
  104     <td>
  105       <a href="api/ngRoute#service">Services / Factories</a>
  106     </td>
  107     <td>
  108       The following services are used for route management:
  109       <ul>
  110         <li><a href="api/ngRoute/service/$routeParams">$routeParams</a> is used to access the querystring values present in the URL.</li>
  111         <li><a href="api/ngRoute/service/$route">$route</a> is used to access the details of the route that is currently being accessed.</li>
  112         <li><a href="api/ngRoute/provider/$routeProvider">$routeProvider</a> is used to register routes for the application.</li>
  113       </ul>
  114     </td>
  115   </tr>
  116   <tr>
  117     <td>
  118       <a href="api/ngRoute#directive">Directives</a>
  119     </td>
  120     <td>
  121       The <a href="api/ngRoute/directive/ngView">ngView</a> directive will display the template of the current route within the page.
  122     </td>
  123   </tr>
  124 </table>
  125 
  126 
  127 <h2 id="-link-nganimate-nganimate-"><a href="api/ngAnimate">ngAnimate</a></h2>
  128 <p>Use ngAnimate to enable animation features within your application. Various core AngularJS directives will provide
  129 animation hooks into your application when ngAnimate is included. Animations are defined by using CSS transitions/animations
  130 or JavaScript callbacks.</p>
  131 <div class="alert alert-info">Include the <strong>angular-animate.js</strong> file and set <strong>ngAnimate</strong> as a dependency for this to work in your application.</div>
  132 
  133 <table class="definition-table spaced">
  134   <tr>
  135     <td>
  136       <a href="api/ngAnimate#service">Services / Factories</a>
  137     </td>
  138     <td>
  139       Use <a href="api/ng/service/$animate">$animate</a> to trigger animation operations within your directive code.
  140     </td>
  141   </tr>
  142   <tr>
  143     <td>
  144       <a href="api/ngAnimate">CSS-based animations</a>
  145     </td>
  146     <td>
  147       Follow ngAnimate’s CSS naming structure to reference CSS transitions / keyframe animations in AngularJS. Once defined, the animation can be triggered by referencing the CSS class within the HTML template code.
  148     </td>
  149   </tr>
  150   <tr>
  151     <td>
  152       <a href="api/ngAnimate">JS-based animations</a>
  153     </td>
  154     <td>
  155       Use <a href="api/ng/type/angular.Module#animation">module.animation()</a> to register a JavaScript animation. Once registered, the animation can be triggered by referencing the CSS class within the HTML template code.
  156     </td>
  157   </tr>
  158 </table>
  159 
  160 <h2 id="-link-ngaria-ngaria-"><a href="api/ngAria">ngAria</a></h2>
  161 <p>Use ngAria to inject common accessibility attributes into directives and improve the experience for users with disabilities.</p>
  162 <div class="alert alert-info">Include the <strong>angular-aria.js</strong> file and set ngAria as a dependency for this to work in your application.</div>
  163 
  164 <table class="definition-table spaced">
  165   <tr>
  166     <td>
  167       <a href="api/ngAria#service">Services</a>
  168     </td>
  169     <td>
  170       <p>
  171           The <a href="api/ngAria/service/$aria">$aria</a> service contains helper methods for applying ARIA attributes to HTML.
  172       <p>
  173       <p>
  174           <a href="api/ngAria/provider/$ariaProvider">$ariaProvider</a> is used for configuring ARIA attributes.
  175       </p>
  176     </td>
  177   </tr>
  178 </table>
  179 
  180 <h2 id="-link-ngresource-ngresource-"><a href="api/ngResource">ngResource</a></h2>
  181 <p>Use the ngResource module when querying and posting data to a REST API.</p>
  182 <div class="alert alert-info">Include the <strong>angular-resource.js</strong> file and set <strong>ngResource</strong> as a dependency for this to work in your application.</div>
  183 
  184 <table class="definition-table spaced">
  185   <tr>
  186     <td>
  187       <a href="api/ngResource#service">Services / Factories</a>
  188     </td>
  189     <td>
  190       The <a href="api/ngResource/service/$resource">$resource</a> service is used to define RESTful objects which communicate with a REST API.
  191     </td>
  192   </tr>
  193 </table>
  194 
  195 <h2 id="-link-ngcookies-ngcookies-"><a href="api/ngCookies">ngCookies</a></h2>
  196 <p>Use the ngCookies module to handle cookie management within your application.</p>
  197 <div class="alert alert-info">Include the <strong>angular-cookies.js</strong> file and set <strong>ngCookies</strong> as a dependency for this to work in your application.</div>
  198 
  199 <table class="definition-table spaced">
  200   <tr>
  201     <td>
  202       <a href="api/ngCookies#service">Services / Factories</a>
  203     </td>
  204     <td>
  205       The <a href="api/ngCookies/service/$cookies">$cookies</a> service is a convenient wrapper to store simple data within browser cookies.
  206     </td>
  207   </tr>
  208 </table>
  209 
  210 <h2 id="-link-ngtouch-ngtouch-"><a href="api/ngTouch">ngTouch</a></h2>
  211 <p>Use ngTouch when developing for mobile browsers/devices.</p>
  212 <div class="alert alert-info">Include the <strong>angular-touch.js</strong> file and set <strong>ngTouch</strong> as a dependency for this to work in your application.</div>
  213 
  214 <table class="definition-table spaced">
  215   <tr>
  216     <td>
  217       <a href="api/ngTouch#service">Services / Factories</a>
  218     </td>
  219     <td>
  220       The <a href="api/ngTouch/service/$swipe">$swipe</a> service is used to register and manage mobile DOM events.
  221     </td>
  222   </tr>
  223   <tr>
  224     <td>
  225       <a href="api/ngTouch#directive">Directives</a>
  226     </td>
  227     <td>
  228       Various directives are available in ngTouch to emulate mobile DOM events.
  229     </td>
  230   </tr>
  231 </table>
  232 
  233 <h2 id="-link-ngsanitize-ngsanitize-"><a href="api/ngSanitize">ngSanitize</a></h2>
  234 <p>Use ngSanitize to securely parse and manipulate HTML data in your application.</p>
  235 <div class="alert alert-info">Include the <strong>angular-sanitize.js</strong> file and set <strong>ngSanitize</strong> as a dependency for this to work in your application.</div>
  236 
  237 <table class="definition-table spaced">
  238   <tr>
  239     <td>
  240       <a href="api/ngSanitize#service">Services / Factories</a>
  241     </td>
  242     <td>
  243       The <a href="api/ngSanitize/service/$sanitize">$sanitize</a> service is used to clean up dangerous HTML code in a quick and convenient way.
  244     </td>
  245   </tr>
  246   <tr>
  247     <td>
  248       <a href="api/ngSanitize#filter">Filters</a>
  249     </td>
  250     <td>
  251       The <a href="api/ngSanitize/filter/linky">linky filter</a> is used to turn URLs into HTML links within the provided string.
  252     </td>
  253   </tr>
  254 </table>
  255 
  256 <h2 id="-link-ngmock-ngmock-"><a href="api/ngMock">ngMock</a></h2>
  257 <p>Use ngMock to inject and mock modules, factories, services and providers within your unit tests.</p>
  258 <div class="alert alert-info">Include the <strong>angular-mocks.js</strong> file into your test runner for this to work.</div>
  259 
  260 <table class="definition-table spaced">
  261   <tr>
  262     <td>
  263       <a href="api/ngMock#service">Services / Factories</a>
  264     </td>
  265     <td>
  266       <p>
  267         ngMock will extend the behavior of various core services to become testing aware and manageable in a synchronous manner.
  268       <p>
  269 
  270       <p>
  271         Some examples include:
  272           <a href="api/ngMock/service/$timeout">$timeout</a>,
  273           <a href="api/ngMock/service/$interval">$interval</a>,
  274           <a href="api/ngMock/service/$log">$log</a>,
  275           <a href="api/ngMock/service/$httpBackend">$httpBackend</a>,
  276           etc...
  277       <p>
  278     </td>
  279   </tr>
  280   <tr>
  281     <td>
  282       <a href="api/ngMock#function">Global APIs</a>
  283     </td>
  284     <td>
  285       <p>
  286         Various helper functions are available to inject and mock modules within unit test code.
  287       </p>
  288 
  289       <p>
  290         Some examples
  291           <a href="api/ngMock/function/angular.mock.inject">inject()</a>,
  292           <a href="api/ngMock/function/angular.mock.module">module()</a>,
  293           <a href="api/ngMock/function/angular.mock.dump">dump()</a>,
  294           etc...
  295       <p>
  296     </td>
  297   </tr>
  298 </table>
  299