Here is my code:
function ParentCtrl($scope) {
$scope.people = [\"Tom\", \"Dick\", \"Harry\"];
$scope.count = $scope.people.length;
}
function ChildCtrl($scope)
It might help you!!!
Scope is a special JavaScript object that connects controller with views. Scope contains model data. In controllers, model data is accessed via $scope object.
Scope Inheritance Scope is controller-specific. If we define nested controllers, then the child controller inherits the scope of its parent controller.
Live example as give below.
Angular JS Forms
AngularJS Sample Application
{{message}}
{{type}}
{{message}}
{{type}}
{{message}}
{{type}}