$sce.trustAsUrl()

trustAsUrl(value); Shorthand method. $sce.trustAsUrl(value) â $sceDelegate.trustAs($sce.URL, value) Parameters Param Type Details value * The value to trustAs. Returns * An object that can be passed to $sce.getTrustedUrl(value) to obtain the original value. (privileged directives only accept expressions that are either literal constants or are the return value of $sce.trustAs.)

$sceDelegate.trustAs()

trustAs(type, value); Returns an object that is trusted by angular for use in specified strict contextual escaping contexts (such as ng-bind-html, ng-include, any src attribute interpolation, any dom event binding attribute interpolation such as for onclick, etc.) that uses the provided value. See $sce for enabling strict contextual escaping. Parameters Param Type Details type string The kind of context in which this value is safe for use. e.g. url, resourceUrl, html, js and css. value

auto.$provide.service()

service(name, constructor); Register a service constructor, which will be invoked with new to create the service instance. This is short for registering a service where its provider's $get property is a factory function that returns an instance instantiated by the injector from the service constructor function. Internally it looks a bit like this: { $get: function() { return $injector.instantiate(constructor); } } You should use $provide.service(class) if you define your service as a

ngHref

directive in module ng Using Angular markup like {{hash}} in an href attribute will make the link go to the wrong URL if the user clicks it before Angular has a chance to replace the {{hash}} markup with its value. Until Angular replaces the markup the link will be broken and will most likely return a 404 error. The ngHref directive solves this problem. The wrong way to write it: <a href="http://www.gravatar.com/avatar/{{hash}}">link1</a> The correct way to write it: <a ng-

ngRoute.$route.$routeUpdate

$routeUpdate The reloadOnSearch property has been set to false, and we are reusing the same instance of the Controller. Type: broadcast Target: root scope Parameters Param Type Details angularEvent Object Synthetic event object current Route Current/previous route information.

$rootScopeProvider

$rootScope provider in module ng Provider for the $rootScope service. Methods digestTtl(limit); Sets the number of $digest iterations the scope should attempt to execute before giving up and assuming that the model is unstable. The current default is 10 iterations. In complex applications it's possible that the dependencies between $watchs will result in several digest iterations. However if an application needs more than the default 10 digest iterations for its model to stabilize th

$rootScope.Scope.$eval()

$eval([expression], [locals]); Executes the expression on the current scope and returns the result. Any exceptions in the expression are propagated (uncaught). This is useful when evaluating Angular expressions. var scope = ng.$rootScope.Scope(); scope.a = 1; scope.b = 2; expect(scope.$eval('a+b')).toEqual(3); expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3); Parameters Param Type Details expression (optional) stringfunction() An angular expression to be ex

ngMaxlength

directive in module ng ngMaxlength adds the maxlength validator to ngModel. It is most often used for text-based input controls, but can also be applied to custom text-based controls. The validator sets the maxlength error key if the ngModel.$viewValue is longer than the integer obtained by evaluating the Angular expression given in the ngMaxlength attribute value. Note: This directive is also added when the plain maxlength attribute is used, with two differences: ngMaxlength does not se

form

directive in module ng Directive that instantiates FormController. If the name attribute is specified, the form controller is published onto the current scope under this name. Alias: ngForm In Angular, forms can be nested. This means that the outer form is valid when all of the child forms are valid as well. However, browsers do not allow nesting of <form> elements, so Angular provides the ngForm directive, which behaves identically to form but can be nested. Nested forms can be use

$http.defaults

defaults Runtime equivalent of the $httpProvider.defaults property. Allows configuration of default headers, withCredentials as well as request and response transformations. See "Setting HTTP Headers" and "Transforming Requests and Responses" sections above.