Angularjs Examples

AJS Examples


AngularJS $scope.$new() Function

The AngularJS $new method is used to create new child scope object. The $new takes boolean isolate and parent scope object as parameter. If isolate is set to true then the scope does not prototypically inherit from the parent scope and thus cannot see parent scope properties.

The default value for parent is this scope if not provided otherwise provided parent will be the $parent of the newly created scope. The scope can be removed from the scope hierarchy using $destroy() method.

Syntax

AngularJS $scope.$new() Function Example