filter

filter in module ng Selects a subset of items from array and returns it as a new array. Usage In HTML Template Binding {{ filter_expression | filter : expression : comparator}} In JavaScript $filter('filter')(array, expression, comparator) Arguments Param Type Details array Array The source array. expression stringObjectfunction() The predicate to be used for selecting items from array. Can be one of: string: The string is used for matching against the contents of the array.

$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.$animate

service in module ngMock Mock implementation of the $animate service. Exposes two additional methods for testing animations. Methods closeAndFlush(); This method will close all pending animations (both Javascript and CSS) and it will also flush any remaining animation frames and/or callbacks. flush(); This method is used to flush the pending callbacks and animation frames to either start an animation or conclude an animation. Note that this will not actually close an actively runni

angular.toJson

function in module ng Serializes input into a JSON-formatted string. Properties with leading $$ characters will be stripped since angular uses this notation internally. Usage angular.toJson(obj, pretty); Arguments Param Type Details obj ObjectArrayDatestringnumber Input to be serialized into JSON. pretty (optional) booleannumber If set to true, the JSON output will contain newlines and whitespace. If set to an integer, the JSON output will contain that many spaces per indentat

$location.$locationChangeSuccess

$locationChangeSuccess Broadcasted after a URL was changed. The newState and oldState parameters may be defined only in HTML5 mode and when the browser supports the HTML5 History API. Type: broadcast Target: root scope Parameters Param Type Details angularEvent Object Synthetic event object. newUrl string New URL oldUrl (optional) string URL that was before it was changed. newState (optional) string New history state object oldState (optional) string History s

$q.resolve()

resolve(value, [successCallback], [errorCallback], [progressCallback]); Alias of when to maintain naming consistency with ES6. Parameters Param Type Details value * Value or a promise successCallback (optional) Function= errorCallback (optional) Function= progressCallback (optional) Function= Returns Promise Returns a promise of the passed value or promise

Guide: Developer Guide

Everything you need to know about AngularJS What is AngularJS? Conceptual Overview Tutorials Official AngularJS Tutorial 10 Reasons Why You Should Use AngularJS 10 Reasons Why Developers Should Learn AngularJS Design Principles of AngularJS (video) Fundamentals in 60 Minutes (video) For folks with a jQuery background Core Concepts Templates In Angular applications, you move the job of filling page templates with data from the server to the client. The result is a system better structured fo

$animate.on()

on(event, container, callback); Sets up an event listener to fire whenever the animation event (enter, leave, move, etc...) has fired on the given element or among any of its children. Once the listener is fired, the provided callback is fired with the following params: $animate.on('enter', container, function callback(element, phase) { // cool we detected an enter animation within the container } ); Parameters Param Type Details event string the animation event that will be