Beruflich Dokumente
Kultur Dokumente
Formats a number as a currency (ie $cacheFactory Name of the current scope. Optional
$1,234.56). defaults to the name at registration.
compiledHtml = $compile(html)(scope)
date | date[:format] priority {integer}
$controller
array | filter:expression Specifies order multiple directives apply on
$cookieStore
single DOM element (higher = first)
Selects a subset of items from array.
$document
Expression takes string|Object|function() terminal {true}
$exceptionHandler (exception[, cause])
data | json Current priority will be last set of directives
$filter (name)
to execute
Convert a JavaScript object into JSON
$http [(options)]
string. scope {true | object}
$httpBackend
array | limitTo:limit True - create child scope. Undefi ned|false -
$injector use parent scope. {} - isolate scope (with
Creates a new array containing only a
$interpolate(text[, mustHaveExpression]) specified attributes/scope variables passed):
specified number of elements in an array.
@ or @attr - bind local model to value of
text | linky 1 $locale DOM attribute (string), = or =attr - bi-
Finds links in text input and turns them into $location directional binding between local model and
Formats a number as text. If the input is not $resource(url[, paramDefaults][, actions]) Controller constructor function instantiated
a number an empty string is returned. before pre-linking phase and shared with
$rootElement
other directives if requested by name
array | orderBy:predicate[:reverse]
$rootScope
require {string | array[strings]}
Predicate is function(*)|string|Array. Reverse
$route
is boolean Require another controller (ngModel).
$routeParams Prefixes: ? - Don't raise error. ^ - Look on
string | uppercase
$routeProvider parent elements too
Converts string to uppercase.
$sanitize(html) restrict {string: 'EACM'}
You can inject the $filter service and do
$scope See $rootScope E - Element: <my-directive />. A - Attribute
$filter('filterName')(value[, :optionalParam][,
(default): <div my-direct ive="exp" />. C -
:optionalParam]) in use it in your javascript. $templateCache
Class: <div class="m
y-directive: exp;" />.
1 Requires ngSanitize Module
$timeout(fn[, delay][, invokeApply])
M - Comment: <!-- directive: my-directive
$window exp -->
Replace current element with contents and <form|ng-form name="plaintext"> | ng- Bold means the actual directive
migrates all attributes / classes form="plaintext" Italics mean optional
transclude(function(scope, cloneLinkingFn) ) ng-model="expression" Because the constant are fixed, they get
returns link() applied before other provide methods.
ng-mousedown="expression"
For transforming the template (rare, run once controller(name, constructor)
per template instance). ng-mouseenter="expression"
directive(name, directiveFactory)
ng-mouseleave="expression"
link function(scope, iElement, iAttrs, controller)
factory(name, providerFunction)
Executed after template is cloned (run once per ng-mousemove="expression"
filter(name, filterFactory)
clone). Contains most logic (DOM listeners, ng-mouseover="expression"
etc). Controller can be an array. provider(name, providerType)
ng-mouseup="expression"
http://docs.angularjs.org/guide/directive run(initializationFn)
<select ng-multiple>
Use this method to register work which
ng-non-bindable
Directives needs to be performed when the injector
ng-options="select [as label] [group by with with the current module is finished
ng-app="plaintext"
group] for ([key,] value) in object|array" loading.
ng-bind[-html-unsafe]="expression" ng-pluralize|<ng-pluralize count="number" service(name, constructor)
ng-bind- when="object" offset="number">
value(name, object)
template="string{{expression}}string{{expression}}" ng-readonly="expression"
name
ng-change="expression" ng-repeat="( [key,] value) in object|array"
Name of the module.
ng-checked="boolean" <option ng-selected="boolean">
ng-class[-even|-odd]="string|object" Holds the list of modules which the injector
ng-src="string"
will load before the current module is
ng-[dbl]click="expression" ng-style="string|object" loaded.
ng-cloak="boolean" ng-submit="expression"
http://docs.angularjs.org/api/angular.Module
ng-controller="plaintext" ng-switch="expression"|<ng-switch
<html ng-csp> (Content Security Policy) on="expression">
ng-switch-when="plaintext"
ng-switch-default
ng-transclude templates
ng-view|<ng-view>
Scope Properties and Methods Scope Properties and Methods (cont) Global Functions (cont)
Move to the top-most $scope (ng-app) Executes the expression on the current Determines if two objects or two values are
scope at a later point in time equivalent.
$parent
$new(isolate) angular.extend(dst, src)
Move to the immediate parent of the current
$scope Creates a new child scope Extends the destination object dst by
copying all of the properties from the src
$id $on(name, listener)
object(s) to dst.
Auto generated Unique ID Listens on events of a given type
angular.forEach(obj, iterator[, context])
$destroy (event) $watch(watchExp, listener(newVal, oldVal,
Invokes the iterator function once for each
Broadcasted when a scope and its children scope), objectEquality)
item in obj collection, which can be either an
are being destroyed Watch a model (exp) for changes and fires object or an array.
the listener callback. Pass true as a third
$apply(exp) angular.fromJson(json)
argument to watch an object's properties
Executes logic within the AngularJS context too. Deserializes a JSON string.
and refreshes all models checks.
The following directives create child scopes: angular.identity()
$broadcast(name, args)
ngInclude, ngSwitch, ngRepeat, A function that returns its first argument.
Dispatches an event name downwards to all ngController, uiIf. Calls to the same This function is useful when writing code in
child scopes ngController will create multiple instances and the functional style.
do not share scopes. Remember to traverse
$destroy() angular.injector(modules)
up the tree to affect primitives on the intended
Removes the current scope (and all of its scope: ng-click="$parent.showPage=t rue" Creates an injector function that can be
children) from the parent scope used for retrieving services as well as for
Process all of the watchers of the current angular.bind(self, fn, args) angular.isArray(value)
scope and its children. Since watchers can Determines if a reference is an Array.
Returns a function which calls function fn
change models, they will continue firing until
bound to self (self becomes the this for fn). angular.isDate(value)
all changes stop. BEWARE OF
RECURSIVE CODE angular.bootstrap(element[, modules]) Determines if a value is a date.
$pristine boolean
Serializes input into a JSON-formatted
string. $dirty boolean
angular.version http://docs.angularjs.org/api/ng.directive:ngModel.
NgModelController
An object that contains information about
the current AngularJS version.