ngMock.$log.assertEmpty()

assertEmpty(); Assert that all of the logging methods have no logged messages. If any messages are present, an exception is thrown.

$compile

$compileProvider service in module ng Compiles an HTML string or DOM into a template and produces a template function, which can then be used to link scope and the template together. The compilation is a process of walking the DOM tree and matching DOM elements to directives. Note: This document is an in-depth reference of all directive options. For a gentle introduction to directives with examples of common use cases, see the directive guide. Comprehensive Directive API There are many

select

directive in module ng HTML SELECT element with angular data-binding. The select directive is used together with ngModel to provide data-binding between the scope and the <select> control (including setting default values). It also handles dynamic <option> elements, which can be added using the ngRepeat or ngOptions directives. When an item in the <select> menu is selected, the value of the selected option will be bound to the model identified by the ngModel directive. Wi

$log.debug()

debug(); Write a debug message

form.FormController.$setPristine()

$setPristine(); Sets the form to its pristine state. This method can be called to remove the 'ng-dirty' class and set the form to its pristine state (ng-pristine class). This method will also propagate to all the controls contained in this form. Setting a form back to a pristine state is often useful when we want to 'reuse' a form after saving or resetting it.

$rootScope.Scope.$root

$root Reference to the root scope.

form.FormController.$submitted

$submitted boolean True if user has submitted the form even if its invalid.

$cacheFactory.Cache.info()

info(); Retrieve information regarding a particular Cache. Returns object an object with the following properties: id: the id of the cache instance size: the number of entries kept in the cache instance ...: any additional properties from the options object when creating the cache.

$location.host()

host(); This method is getter only. Return host of current url. Note: compared to the non-angular version location.host which returns hostname:port, this returns the hostname portion only. // given url http://example.com/#/some/path?foo=bar&baz=xoxo var host = $location.host(); // => "example.com" // given url http://user:password@example.com:8080/#/some/path?foo=bar&baz=xoxo host = $location.host(); // => "example.com" host = location.host; // => "example.com:8080" Returns

ngMock

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