angular.injector

function in module ng Creates an injector object that can be used for retrieving services as well as for dependency injection (see dependency injection). Usage angular.injector(modules, [strictDi]); Arguments Param Type Details modules Array.<string|Function> A list of module functions or their aliases. See angular.module. The ng module must be explicitly added. strictDi (optional) boolean Whether the injector should be in strict mode, which disallows argument name annot

angular.extend

function in module ng Extends the destination object dst by copying own enumerable properties from the src object(s) to dst. You can specify multiple src objects. If you want to preserve original objects, you can do so by passing an empty object as the target: var object = angular.extend({}, object1, object2). Note: Keep in mind that angular.extend does not support recursive merge (deep copy). Use angular.merge for this. Usage angular.extend(dst, src); Arguments Param Type Details dst

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

ngCookies.$cookies.put()

put(key, value, [options]); Sets a value for given cookie key Parameters Param Type Details key string Id for the value. value string Raw value to be stored. options (optional) Object Options object. See $cookiesProvider.defaults

ngMock.$exceptionHandler

$exceptionHandlerProvider service in module ngMock Mock implementation of $exceptionHandler that rethrows or logs errors passed to it. See $exceptionHandlerProvider for configuration information. describe('$exceptionHandlerProvider', function() { it('should capture log messages and exceptions', function() { module(function($exceptionHandlerProvider) { $exceptionHandlerProvider.mode('log'); }); inject(function($log, $exceptionHandler, $timeout) { $timeout(func

$rootScope.Scope.$evalAsync()

$evalAsync([expression], [locals]); Executes the expression on the current scope at a later point in time. The $evalAsync makes no guarantees as to when the expression will be executed, only that: it will execute after the function that scheduled the evaluation (preferably before DOM rendering). at least one $digest cycle will be performed after expression execution. Any exceptions from the execution of the expression are forwarded to the $exceptionHandler service. Note: if this function is ca

Guide: Templates

In Angular, templates are written with HTML that contains Angular-specific elements and attributes. Angular combines the template with information from the model and controller to render the dynamic view that a user sees in the browser. These are the types of Angular elements and attributes you can use: Directive â An attribute or element that augments an existing DOM element or represents a reusable DOM component. Markup â The double curly brace notation {{ }} to bind expressions to elements

form.FormController.$commitViewValue()

$commitViewValue(); Commit all form controls pending updates to the $modelValue. Updates may be pending by a debounced event or because the input is waiting for a some future event defined in ng-model-options. This method is rarely needed as NgModelController usually handles calling this in response to input events.

ngMock.$httpBackend.expect()

expect(method, url, [data], [headers], [keys]); Creates a new request expectation. Parameters Param Type Details method string HTTP method. url stringRegExpfunction(string) HTTP url or function that receives a url and returns true if the url matches the current definition. data (optional) stringRegExpfunction(string)Object HTTP request body or function that receives data string and returns true if the data is as expected, or Object if request body is in JSON format. headers

$httpBackend

service in module ng HTTP backend used by the service that delegates to XMLHttpRequest object or JSONP and deals with browser incompatibilities. You should never need to use this service directly, instead use the higher-level abstractions: $http or $resource. During testing this implementation is swapped with mock $httpBackend which can be trained with responses. Dependencies $window $document $xhrFactory