Formats a number as a currency (ie $1,234.56).
Selects a subset of items from array. Expression takes strin­g|O­bje­ct|­fun­cti­on()
Convert a JavaScript object into JSON string.
Creates a new array containing only a specified number of elements in an array.
Finds links in text input and turns them into html links.
Converts string to lowercase.
Formats a number as text. If the input is not a number an empty string is returned.
Predicate is functi­on(­*)|­str­ing­|Array. Reverse is boolean
Converts string to uppercase.
You can inject the $filter service and do $filt­er(­'fi­lte­rNa­me'­)(v­alue[, :optio­nal­Par­am][, :optio­nal­Par­am]) in use it in your javasc­ript.
1 Requires ngSanitize Module


compil­edHtml = $com­pil­e­(ht­ml)­(scope)
$exc­ept­ion­Han­dle­r­(ex­cep­tion[, cause])
$int­erp­ola­te­(t­ext[, mustHa­veE­xpr­ess­ion])
$res­our­ce­(url[, paramD­efa­ults][, actions])
$scope See $rootS­cope
$tim­eou­t­(fn[, delay][, invoke­App­ly])

Directive Definition Object

name {string}
Name of the current scope. Optional defaults to the name at regist­ration.
prio­rity {inte­ger}
Specifies order multiple directives apply on single DOM element (higher = first)
term­inal {true}
Current priority will be last set of directives to execute
scope {true | object}
True - create child scope. Undef­ine­d|f­alse - use parent scope. {} - isolate scope (with specified attrib­ute­s/scope variables passed): @ or @attr - bind local model to value of DOM attribute (string), = or =attr - bi-dir­ect­ional binding between local model and the parent scope, & or &attr - execute an expression in context of parent. Reference attr OR assumes model of same name
cont­rol­ler funct­ion­($s­cope, $element, $attrs, $trans­clude)
Controller constr­uctor function instan­tiated before pre-li­nking phase and shared with other directives if requested by name
requ­ire {string | array[­str­ings]}
Require another controller (ngMo­del). Prefixes: ? - Don't raise error. ^ - Look on parent elements too
rest­rict {string: 'EACM'}
E - Element: <m­y-d­ire­ctive />. A - Attrib­ute (default): <div my-di­rec­tiv­e=­"­exp­" />. C - Class: <div class=­"­my­-di­rec­tive: exp;" />. M - Comment: <!-- directive: my-di­rec­tive exp -->
temp­late {string}
Replace current element with contents and migrates all attributes / classes
temp­lat­eUrl {string}
Same as template but the template is loaded from the specified URL
repl­ace {bool­ean}
true: template replaces element instead of appending
tran­scl­ude {bool­ean}
Compiles contents on parent (pre-i­solate) scope. Usually used with ngTran­sclude & templates.
comp­ile funct­ion­(tE­lement, tAttrs, fn transc­lud­e(f­unc­tio­n(s­cope, cloneL­ink­ingFn) ) returns link()
For transf­orming the template (rare, run once per template instance).
link funct­ion­(scope, iElement, iAttrs, contro­ller)
Executed after template is cloned (run once per clone). Contains most logic (DOM listeners, etc). Contr­oller can be an array.


<input ng-p­att­ern­=­"­/re­gex­/" ng-m­inl­ength ng-m­axl­ength ng-r­equ­ired
<input type="c­hec­kbo­x" ng-t­rue­-va­lue­=­"­pla­int­ext­" ng-f­als­e-v­alu­e­="pl­ain­tex­t">
<select ng-m­ult­ipl­e>
Bold means the actual directive
Italics mean optional
Pipes mean either|or
Plaintext means no string encaps­ulation
Super­script means notes or context
<Br­ack­ets> mean tag compti­bility
Lack of <br­ack­ets> means the attribute can apply to any tag


Use this method to register work which needs to be performed on module loading.
Because the constant are fixed, they get applied before other provide methods.
Use this method to register work which needs to be performed when the injector with with the current module is finished loading.
value(­name, object)
Name of the module.
Holds the list of modules which the injector will load before the current module is loaded.

Scope Properties and Methods

$root or $roo­tSc­ope
Move to the top-most $scope (ng-app)
Move to the immediate parent of the current $scope
Auto generated Unique ID
$destroy (event)
Broadc­asted when a scope and its children are being destroyed
Executes logic within the AngularJS context and refreshes all models checks.
$bro­adc­ast­(name, args)
Dispatches an event name downwards to all child scopes
Removes the current scope (and all of its children) from the parent scope
Process all of the watchers of the current scope and its children. Since watchers can change models, they will continue firing until all changes stop. BEWARE OF RECURSIVE CODE
$emi­t(name, args)
Dispatches an event name upwards through the scope hierarchy
Executes the expression on the current scope and returns the result
Executes the expression on the current scope at a later point in time
Creates a new child scope
$on(­name, listen­er)
Listens on events of a given type
$wat­ch(­wat­chExp, listen­er(­newVal, oldVal, scope), object­Equ­ali­ty)
Watch a model (exp) for changes and fires the listener callback. Pass true as a third argument to watch an object's properties too.
The following directives create child scopes: ngInc­lude, ngSwi­tch, ngRep­eat, ngCon­tro­ller, uiIf. Calls to the same ngCon­tro­ller will create multiple instances and do not share scopes. Remember to traverse up the tree to affect primi­tives on the intended scope: ng-cl­ick­="$p­are­nt.s­ho­wPa­ge=­tru­e"

Global Functions

Returns a function which calls function fn bound to self (self becomes the this for fn).
Use this function to manually start up angular applic­ation.
Creates a deep copy of source, which should be an object or an array.
Wraps a raw DOM element or HTML string as a jQuery element.
Determines if two objects or two values are equiva­lent.
Extends the destin­ation object dst by copying all of the properties from the src object(s) to dst.
Invokes the iterator function once for each item in obj collec­tion, which can be either an object or an array.
Deseri­alizes a JSON string.
A function that returns its first argument. This function is useful when writing code in the functional style.
Creates an injector function that can be used for retrieving services as well as for dependency injection.
Determines if a reference is an Array.
Determines if a value is a date.
Determines if a reference is defined.
Determines if a reference is a DOM element (or wrapped jQuery element).
Determines if a reference is a Function.
Determines if a reference is a Number.
Determines if a reference is an Object. Unlike typeof in JavaSc­ript, nulls are not considered to be objects.
Determines if a reference is a String.
Determines if a reference is undefined.
Converts the specified string to lowercase.
Namespace from 'angul­ar-­moc­ks.js' which contains testing related code.
The angula­r.m­odule is a global place for creating and regist­ering Angular modules. Requires argument always creates a new module.
A function that performs no operat­ions.
Serializes input into a JSON-f­orm­atted string.
Converts the specified string to uppercase.
An object that contains inform­ation about the current AngularJS version.


Called when the view needs to be updated. It is expected that the user of the ng-model directive will implement this method.
$setVa­lid­ity­(va­lid­ati­onE­rro­rKey, isValid)
array of function after reading val from DOM to sanitize / convert / validate the value
array of functions to convert / validate the value

Deferred and Promise

$q.a­ll(­[array of promis­es])
Creates a Deferred object which represents a task which will finish in the future.
$q. defer()
Creates a Deferred object which represents a task which will finish in the future.
Creates a promise that is resolved as rejected with the specified reason
Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise
Resolves the derived promise with the value
Rejects the derived promise with the reason
Promise object associated with this deferred
Prom­­en(­suc­ces­sCa­llback, errorC­all­back)