ngMock.$httpBackend.flush()

flush([count]); Flushes all pending requests using the trained responses. Parameters Param Type Details count (optional) number Number of responses to flush (in the order they arrived). If undefined, all pending requests will be flushed. If there are no pending requests when the flush method is called an exception is thrown (as this typically a sign of programming error).

$sce.parseAsUrl()

parseAsUrl(expression); Shorthand method. $sce.parseAsUrl(value) â $sce.parseAs($sce.URL, value) Parameters Param Type Details expression string String expression to compile. Returns function(context, locals) a function which represents the compiled expression: context â {object} â an object against which any expressions embedded in the strings are evaluated against (typically a scope object). locals â {object=} â local variables context object, useful for overriding

$animate.off()

off(event, [container], [callback]); Deregisters an event listener based on the event which has been associated with the provided element. This method can be used in three different ways depending on the arguments: // remove all the animation event listeners listening for `enter` $animate.off('enter'); // remove all the animation event listeners listening for `enter` on the given element and its children $animate.off('enter', container); // remove the event listener function provided by `cal

$animate.setClass()

setClass(element, add, remove, [options]); Performs both the addition and removal of a CSS classes on an element and (during the process) triggers an animation surrounding the class addition/removal. Much like $animate.addClass and $animate.removeClass, setClass will only evaluate the classes being added/removed once a digest has passed. Note that class-based animations are treated differently compared to structural animations (like enter, move and leave) since the CSS classes may be added/rem

limitTo

filter in module ng Creates a new array or string containing only a specified number of elements. The elements are taken from either the beginning or the end of the source array, string or number, as specified by the value and sign (positive or negative) of limit. If a number is used as input, it is converted to a string. Usage In HTML Template Binding {{ limitTo_expression | limitTo : limit : begin}} In JavaScript $filter('limitTo')(input, limit, begin) Arguments Param Type Details inp

ngComponentRouter.Router

type in module ngComponentRouter A Router is responsible for mapping URLs to components. Routers and "Routing Component" instances have a 1:1 correspondence. The Router holds reference to one or more of Outlets. There are two kinds of Router: RootRouter and ChildRouter. You can see the state of a router by inspecting the read-only field router.navigating. This may be useful for showing a spinner, for instance.

$compileProvider.aHrefSanitizationWhitelist()

aHrefSanitizationWhitelist([regexp]); Retrieves or overrides the default regular expression that is used for whitelisting of safe urls during a[href] sanitization. The sanitization is a security measure aimed at preventing XSS attacks via html links. Any url about to be assigned to a[href] via data-binding is first normalized and turned into an absolute url. Afterwards, the url is matched against the aHrefSanitizationWhitelist regular expression. If a match is found, the original url is writte

ngMock.$timeout.verifyNoPendingTasks()

verifyNoPendingTasks(); Verifies that there are no pending tasks that need to be flushed.

$httpProvider.defaults

defaults Object containing default values for all $http requests. defaults.cache - {boolean|Object} - A boolean value or object created with $cacheFactory to enable or disable caching of HTTP responses by default. See $http Caching for more information. defaults.xsrfCookieName - {string} - Name of cookie containing the XSRF token. Defaults value is 'XSRF-TOKEN'. defaults.xsrfHeaderName - {string} - Name of HTTP header to populate with the XSRF token. Defaults value is 'X-XSRF-TOKEN'. d

$sce.parseAsHtml()

parseAsHtml(expression); Shorthand method. $sce.parseAsHtml(expression string) â $sce.parseAs($sce.HTML, value) Parameters Param Type Details expression string String expression to compile. Returns function(context, locals) a function which represents the compiled expression: context â {object} â an object against which any expressions embedded in the strings are evaluated against (typically a scope object). locals â {object=} â local variables context object, useful