$rootScope.Scope.$new()

$new(isolate, parent);

Creates a new child scope.

The parent scope will propagate the $digest() event. The scope can be removed from the scope hierarchy using $destroy().

$destroy() must be called on a scope when it is desired for the scope and its child scopes to be permanently detached from the parent and thus stop participating in model change detection and listener notification by invoking.

Parameters

Param Type Details
isolate boolean

If true, then the scope does not prototypically inherit from the parent scope. The scope is isolated, as it can not see parent scope properties. When creating widgets, it is useful for the widget to not accidentally read parent state.

parent
(optional)
Scope

The Scope that will be the $parent of the newly created scope. Defaults to this scope if not provided. This is used when creating a transclude scope to correctly place it in the scope hierarchy while maintaining the correct prototypical inheritance.

(default: this)

Returns

Object

The newly created child scope.

doc_AngularJS
2016-03-29 16:10:39
Comments
Leave a Comment

Please login to continue.