ngKeyup

directive in module ng Specify custom behavior on keyup event. Directive Info This directive executes at priority level 0. Usage as attribute: <ANY ng-keyup="expression"> ... </ANY> Arguments Param Type Details ngKeyup expression Expression to evaluate upon keyup. (Event object is available as $event and can be interrogated for keyCode, altKey, etc.)

ngForm

directive in module ng Nestable alias of form directive. HTML does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a sub-group of controls needs to be determined. Note: the purpose of ngForm is to group controls, but not to be a replacement for the <form> tag with all of its capabilities (e.g. posting to the server, ...). Directive Info This directive executes at priority level 0. Usage as element: (This directive can be used as custo

ngChange

directive in module ng 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). The ngChange expression is only evaluated when a change in the input value causes a new value to be committed to the model. It will not be evaluated: if the value returned from the $parsers transformation pipeli

Guide: i18n and l10n

Internationalization (i18n) is the process of developing products in such a way that they can be localized for languages and cultures easily. Localization (l10n), is the process of adapting applications and text to enable their usability in a particular cultural or linguistic market. For application developers, internationalizing an application means abstracting all of the strings and other locale-specific bits (such as date or currency formats) out of the application. Localizing an application

currency

filter in module ng Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default symbol for current locale is used. Usage In HTML Template Binding {{ currency_expression | currency : symbol : fractionSize}} In JavaScript $filter('currency')(amount, symbol, fractionSize) Arguments Param Type Details amount number Input to filter. symbol (optional) string Currency symbol or identifier to be displayed. fractionSize (optional) number Number of

$parseProvider

$parse provider in module ng $parseProvider can be used for configuring the default behavior of the $parse service. Methods addLiteral(literalName, literalValue); Configure $parse service to add literal values that will be present as literal at expressions. Parameters Param Type Details literalName string Token for the literal value. The literal name value must be a valid literal name. literalValue * Value for this literal. All literal values must be primitives or undefin

form.FormController.$addControl()

$addControl(control); Register a control with the form. Input elements using ngModelController do this automatically when they are linked. Note that the current state of the control will not be reflected on the new parent form. This is not an issue with normal use, as freshly compiled and linked controls are in a $pristine state. However, if the method is used programmatically, for example by adding dynamically created controls, or controls that have been previously removed without destroying

ngModel.NgModelController.$render()

$render(); Called when the view needs to be updated. It is expected that the user of the ng-model directive will implement this method. The $render() method is invoked in the following situations: $rollbackViewValue() is called. If we are rolling back the view value to the last committed value then $render() is called to update the input control. The value referenced by ng-model is changed programmatically and both the $modelValue and the $viewValue are different from last time. Since ng-mode

ngMock.$componentController

service in module ngMock A service that can be used to create instances of component controllers. Be aware that the controller will be instantiated and attached to the scope as specified in the component definition object. That means that you must always provide a $scope object in the locals param. Usage $componentController(componentName, locals, [bindings], [ident]); Arguments Param Type Details componentName string the name of the component whose controller we want to instantia

ngMock.$httpBackend.whenDELETE()

whenDELETE(url, [headers], [keys]); Creates a new backend definition for DELETE requests. For more info see when(). Parameters Param Type Details url stringRegExpfunction(string) HTTP url or function that receives a url and returns true if the url matches the current definition. headers (optional) Objectfunction(Object) HTTP headers. keys (optional) Array Array of keys to assign to regex matches in request url described above. Returns requestHandler Returns an object with