ngMock.$controller

service in module ngMock A decorator for $controller with additional bindings parameter, useful when testing controllers of directives that use bindToController. // Directive definition ... myMod.directive('myDirective', { controller: 'MyDirectiveController', bindToController: { name: '@' } }); // Controller definition ... myMod.controller('MyDirectiveController', ['$log', function($log) { $log.info(this.name); }]); // In a test ... describe('myDirectiveController', fun

$location.state()

state([state]); This method is getter / setter. Return the history state object when called without any parameter. Change the history state object when called with one parameter and return $location. The state object is later passed to pushState or replaceState. NOTE: This method is supported only in HTML5 mode and only in browsers supporting the HTML5 History API (i.e. methods pushState and replaceState). If you need to support older browsers (like IE9 or Android < 4.0), don't use this met

$interpolateProvider.endSymbol()

endSymbol([value]); Symbol to denote the end of expression in the interpolated string. Defaults to }}. Parameters Param Type Details value (optional) string new value to set the ending symbol to. Returns stringself Returns the symbol when used as getter and self if used as setter.

ngMock.$httpBackend.when()

when(method, url, [data], [headers], [keys]); Creates a new backend definition. 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) HTTP request body or function that receives data string and returns true if the data is as expected. headers (optional) Objectfunction(Object) HTTP headers or

ngMock.$httpBackend.expectPUT()

expectPUT(url, [data], [headers], [keys]); Creates a new request expectation for PUT requests. For more info see expect(). 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. 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.

ngMessages.ngMessages

directive in module ngMessages ngMessages is a directive that is designed to show and hide messages based on the state of a key/value object that it listens on. The directive itself complements error message reporting with the ngModel $error object (which stores a key/value state of validation errors). ngMessages manages the state of internal messages within its container element. The internal messages use the ngMessage directive and will be inserted/removed from the page depending on if t

ngMock.$httpBackend.expectRoute()

expectRoute(method, url); Creates a new request expectation that compares only with the requested route. Parameters Param Type Details method string HTTP method. url string HTTP url string that supports colon param matching. Returns requestHandler Returns an object with respond method that controls how a matched request is handled. You can save this object for later use and invoke respond again in order to change how a matched request is handled. See #expect for more info.

$rootScope.Scope.$id

$id Unique scope ID (monotonically increasing) useful for debugging.

ngIf

directive in module ng The ngIf directive removes or recreates a portion of the DOM tree based on an {expression}. If the expression assigned to ngIf evaluates to a false value then the element is removed from the DOM, otherwise a clone of the element is reinserted into the DOM. ngIf differs from ngShow and ngHide in that ngIf completely removes and recreates the element in the DOM rather than changing its visibility via the display css property. A common case when this difference is signi

ngMockE2E

Installation First include angular-mocks.js in your HTML: <script src="angular.js"> <script src="angular-mocks.js"> You can download this file from the following places: Google CDN e.g. //ajax.googleapis.com/ajax/libs/angularjs/X.Y.Z/angular-mocks.js Bower e.g. bower install angular-mocks@X.Y.Z code.angularjs.org e.g. "//code.angularjs.org/X.Y.Z/angular-mocks.js" where X.Y.Z is the AngularJS version you are running. Then load the module in your application by adding it as a