These pages contain the AngularJS reference materials for version .
The documentation is organized into modules which contain various components of an AngularJS application. These components are directives, services, filters, providers, templates, global APIs, and testing mocks.
There is also a guide with articles on various topics, and a list of external resources.
$$: To prevent accidental name collisions with your code, AngularJS prefixes names of public objects with
$and names of private objects with
$$. Please do not use the
$$prefix in your code.
This module is provided by default and contains the core components of AngularJS.
This is the core collection of directives you would use in your template code to build an AngularJS application.
|Services / Factories||
This is the core collection of services which are used within the DI of your application.
The core filters available in the ng module are used to transform template data before it is rendered within directives and expressions.
The core global API functions are attached to the
Use ngRoute to enable URL routing to your application. The ngRoute module supports URL management via both hashbang and HTML5 pushState.
|Services / Factories||The following services are used for route management:|
|Directives||The ngView directive will display the template of the current route within the page.|
|Services / Factories||Use $animate to trigger animation operations within your directive code.|
|CSS-based animations||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.|
Use ngAria to inject common accessibility attributes into directives and improve the experience for users with disabilities.
The $aria service contains helper methods for applying ARIA attributes to HTML.
$ariaProvider is used for configuring ARIA attributes.
Use the ngResource module when querying and posting data to a REST API.
|Services / Factories||The $resource service is used to define RESTful objects which communicate with a REST API.|
Use the ngCookies module to handle cookie management within your application.
|Services / Factories||The $cookies service is a convenient wrapper to store simple data within browser cookies.|
Use ngTouch when developing for mobile browsers/devices.
|Services / Factories||The $swipe service is used to register and manage mobile DOM events.|
|Directives||Various directives are available in ngTouch to emulate mobile DOM events.|
Use ngSanitize to securely parse and manipulate HTML data in your application.
|Services / Factories||The $sanitize service is used to clean up dangerous HTML code in a quick and convenient way.|
|Filters||The linky filter is used to turn URLs into HTML links within the provided string.|
Use ngMock to inject and mock modules, factories, services and providers within your unit tests.
|Services / Factories||
ngMock will extend the behavior of various core services to become testing aware and manageable in a synchronous manner.
Various helper functions are available to inject and mock modules within unit test code.