Posted On: Feb 22, 2018
In angular there is a scope variable called $parent (i.e. $scope.$parent). $parent is used to access parent scope from child controller in Angular JS.
Example:
<div ng-controller="ParentCtrl">
<h1>{{ name }}</h1>
<p>{{ address }}</p>
<div ng-controller="ChildCtrl">
<h1>{{ title }}</h1>
<input type="text" ng-model="$parent.address" />
</div>
Never Miss an Articles from us.
Explain the architecture of AngularJS?..
What is the Template in AngularJS?..