ng
The ng module is loaded by default when an AngularJS application is started. The module itself contains the essential components for an AngularJS application to function. The table below lists a high level breakdown of each of the services/factories, filters, directives and testing components available within this core module.
Name | Description |
---|---|
angular.forEach | Invokes the |
angular.extend | Extends the destination object |
angular.merge | Deeply extends the destination object |
angular.noop | A function that performs no operations. This function can be useful when writing code in the functional style.
|
angular.identity | A function that returns its first argument. This function is useful when writing code in the functional style. |
angular.isUndefined | Determines if a reference is undefined. |
angular.isDefined | Determines if a reference is defined. |
angular.isObject | Determines if a reference is an |
angular.isString | Determines if a reference is a |
angular.isNumber | Determines if a reference is a |
angular.isDate | Determines if a value is a date. |
angular.isArray | Determines if a reference is an |
angular.isFunction | Determines if a reference is a |
angular.isElement | Determines if a reference is a DOM element (or wrapped jQuery element). |
angular.copy | Creates a deep copy of |
angular.equals | Determines if two objects or two values are equivalent. Supports value types, regular expressions, arrays and objects. |
angular.bind | Returns a function which calls function |
angular.toJson | Serializes input into a JSON-formatted string. Properties with leading $$ characters will be stripped since angular uses this notation internally. |
angular.fromJson | Deserializes a JSON string. |
angular.bootstrap | Use this function to manually start up angular application. |
angular.reloadWithDebugInfo | Use this function to reload the current application with debug information turned on.
This takes precedence over a call to |
angular.injector | Creates an injector object that can be used for retrieving services as well as for dependency injection (see dependency injection). |
angular.element | Wraps a raw DOM element or HTML string as a jQuery element. |
angular.module | The |
Name | Description |
---|---|
ngJq | Use this directive to force the angular.element library. This should be used to force either jqLite by leaving ng-jq blank or setting the name of the jquery variable under window (eg. jQuery). |
ngApp | Use this directive to auto-bootstrap an AngularJS application. The |
a | Modifies the default behavior of the html A tag so that the default action is prevented when the href attribute is empty. |
ngHref | Using Angular markup like |
ngSrc | Using Angular markup like |
ngSrcset | Using Angular markup like |
ngDisabled | This directive sets the |
ngChecked | Sets the |
ngReadonly | Sets the |
ngSelected | Sets the |
ngOpen | Sets the |
ngForm | Nestable alias of |
form | Directive that instantiates FormController. |
textarea | HTML textarea element control with angular data-binding. The data-binding and validation properties of this element are exactly the same as those of the input element. |
input | HTML input element control. When used together with |
ngValue | Binds the given expression to the value of |
ngBind | The |
ngBindTemplate | The |
ngBindHtml | Evaluates the expression and inserts the resulting HTML into the element in a secure way. By default,
the resulting HTML content will be sanitized using the $sanitize service.
To utilize this functionality, ensure that |
ngChange | Evaluate the given expression when the user changes the input. The expression is evaluated immediately, unlike the JavaScript onchange event which only triggers at the end of a change (usually, when the user leaves the form element or presses the return key). |
ngClass | The |
ngClassOdd | The |
ngClassEven | The |
ngCloak | The |
ngController | The |
ngCsp | Angular has some features that can break certain CSP (Content Security Policy) rules. |
ngClick | The ngClick directive allows you to specify custom behavior when an element is clicked. |
ngDblclick | The |
ngMousedown | The ngMousedown directive allows you to specify custom behavior on mousedown event. |
ngMouseup | Specify custom behavior on mouseup event. |
ngMouseover | Specify custom behavior on mouseover event. |
ngMouseenter | Specify custom behavior on mouseenter event. |
ngMouseleave | Specify custom behavior on mouseleave event. |
ngMousemove | Specify custom behavior on mousemove event. |
ngKeydown | Specify custom behavior on keydown event. |
ngKeyup | Specify custom behavior on keyup event. |
ngKeypress | Specify custom behavior on keypress event. |
ngSubmit | Enables binding angular expressions to onsubmit events. |
ngFocus | Specify custom behavior on focus event. |
ngBlur | Specify custom behavior on blur event. |
ngCopy | Specify custom behavior on copy event. |
ngCut | Specify custom behavior on cut event. |
ngPaste | Specify custom behavior on paste event. |
ngIf | The |
ngInclude | Fetches, compiles and includes an external HTML fragment. |
ngInit | The |
ngList | Text input that converts between a delimited string and an array of strings. The default
delimiter is a comma followed by a space - equivalent to |
ngModel | The |
ngModelOptions | Allows tuning how model updates are done. Using |
ngNonBindable | The |
ngOptions | The |
ngPluralize |
|
ngRepeat | The |
ngShow | The |
ngHide | The |
ngStyle | The |
ngSwitch | The |
ngTransclude | Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion. |
script | Load the content of a |
select | HTML |
ngRequired | ngRequired adds the required |
ngPattern | ngPattern adds the pattern |
ngMaxlength | ngMaxlength adds the maxlength |
ngMinlength | ngMinlength adds the minlength |
Name | Description |
---|---|
angular.version | An object that contains information about the current AngularJS version. |
Name | Description |
---|---|
angular.Module | Interface for configuring angular modules. |
$cacheFactory.Cache | A cache object used to store and retrieve data, primarily used by $http and the script directive to cache templates and other data. |
$compile.directive.Attributes | A shared object between directive compile / linking functions which contains normalized DOM
element attributes. The values reflect current binding state |
form.FormController |
|
ngModel.NgModelController |
|
select.SelectController | The controller for the |
$rootScope.Scope | A root scope can be retrieved using the $rootScope key from the $injector. Child scopes are created using the $new() method. (Most scopes are created automatically when compiled HTML template is executed.) See also the Scopes guide for an in-depth introduction and usage examples. |
Name | Description |
---|---|
$anchorScrollProvider | Use |
$animateProvider | Default implementation of $animate that doesn't perform any animations, instead just synchronously performs DOM updates and resolves the returned runner promise. |
$compileProvider | |
$controllerProvider | The $controller service is used by Angular to create new controllers. |
$filterProvider | Filters are just functions which transform input to an output. However filters need to be Dependency Injected. To achieve this a filter definition consists of a factory function which is annotated with dependencies and is responsible for creating a filter function. |
$httpProvider | Use |
$interpolateProvider | Used for configuring the interpolation markup. Defaults to |
$locationProvider | Use the |
$logProvider | Use the |
$parseProvider |
|
$rootScopeProvider | Provider for the $rootScope service. |
$sceDelegateProvider | The |
$sceProvider | The $sceProvider provider allows developers to configure the $sce service.
|
$templateRequestProvider | Used to configure the options passed to the |
Name | Description |
---|---|
$anchorScroll | When called, it scrolls to the element related to the specified |
$animate | The $animate service exposes a series of DOM utility methods that provide support for animation hooks. The default behavior is the application of DOM operations, however, when an animation is detected (and animations are enabled), $animate will do the heavy lifting to ensure that animation runs with the triggered DOM operation. |
$animateCss | This is the core version of |
$cacheFactory | Factory that constructs Cache objects and gives access to them. |
$templateCache | The first time a template is used, it is loaded in the template cache for quick retrieval. You
can load templates directly into the cache in a |
$compile | Compiles an HTML string or DOM into a template and produces a template function, which
can then be used to link |
$controller |
|
$document | A jQuery or jqLite wrapper for the browser's |
$exceptionHandler | Any uncaught exception in angular expressions is delegated to this service.
The default implementation simply delegates to |
$filter | Filters are used for formatting data displayed to the user. |
$httpParamSerializer | Default |
$httpParamSerializerJQLike | Alternative |
$http | The |
$xhrFactory | Factory function used to create XMLHttpRequest objects. |
$httpBackend | HTTP backend used by the service that delegates to XMLHttpRequest object or JSONP and deals with browser incompatibilities. |
$interpolate | Compiles a string with markup into an interpolation function. This service is used by the HTML $compile service for data binding. See $interpolateProvider for configuring the interpolation markup. |
$interval | Angular's wrapper for |
$locale | $locale service provides localization rules for various Angular components. As of right now the only public api is: |
$location | The $location service parses the URL in the browser address bar (based on the window.location) and makes the URL available to your application. Changes to the URL in the address bar are reflected into $location service and changes to $location are reflected into the browser address bar. |
$log | Simple service for logging. Default implementation safely writes the message into the browser's console (if present). |
$parse | Converts Angular expression into a function. |
$q | A service that helps you run functions asynchronously, and use their return values (or exceptions) when they are done processing. |
$rootElement | The root element of Angular application. This is either the element where ngApp was declared or the element passed into
|
$rootScope | Every application has a single root scope. All other scopes are descendant scopes of the root scope. Scopes provide separation between the model and the view, via a mechanism for watching the model for changes. They also provide event emission/broadcast and subscription facility. See the developer guide on scopes. |
$sceDelegate |
|
$sce |
|
$templateRequest | The |
$timeout | Angular's wrapper for |
$window | A reference to the browser's |
Name | Description |
---|---|
input[text] | Standard HTML text input with angular data binding, inherited by most of the |
input[date] | Input with date validation and transformation. In browsers that do not yet support
the HTML5 date input, a text element will be used. In that case, text must be entered in a valid ISO-8601
date format (yyyy-MM-dd), for example: |
input[datetime-local] | Input with datetime validation and transformation. In browsers that do not yet support
the HTML5 date input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
local datetime format (yyyy-MM-ddTHH:mm:ss), for example: |
input[time] | Input with time validation and transformation. In browsers that do not yet support
the HTML5 time input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
local time format (HH:mm:ss), for example: |
input[week] | Input with week-of-the-year validation and transformation to Date. In browsers that do not yet support
the HTML5 week input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
week format (yyyy-W##), for example: |
input[month] | Input with month validation and transformation. In browsers that do not yet support
the HTML5 month input, a text element will be used. In that case, the text must be entered in a valid ISO-8601
month format (yyyy-MM), for example: |
input[number] | Text input with number validation and transformation. Sets the |
input[url] | Text input with URL validation. Sets the |
input[email] | Text input with email validation. Sets the |
input[radio] | HTML radio button. |
input[checkbox] | HTML checkbox. |
Name | Description |
---|---|
filter | Selects a subset of items from |
currency | Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used. |
number | Formats a number as text. |
date | Formats |
json | Allows you to convert a JavaScript object into JSON string. |
lowercase | Converts string to lowercase. |
uppercase | Converts string to uppercase. |
limitTo | Creates a new array or string containing only a specified number of elements. The elements
are taken from either the beginning or the end of the source array, string or number, as specified by
the value and sign (positive or negative) of |
orderBy | Orders a specified |