<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Controller As Syntax</title>
  <script src="js/angular.min.js"></script>
  <script src="js/app.module.js"></script>
  <script src="js/app.parentController1.js"></script>
</head>
<body data-ng-app="MyApp">
  <h1>
    Controller As Syntax
  </h1>
  <div data-ng-controller="ParentController1">
    <div data-ng-controller="ChildController1"></div>
  </div>
</body>
</html>

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Controller As Syntax</title>
  <script src="js/angular.min.js"></script>
  <script src="js/app.module.js"></script>
  <script src="js/app.parentController1.js"></script>
</head>
<body data-ng-app="MyApp">
  <h1>
    Controller As Syntax
  </h1>
  <div data-ng-controller="ParentController1">
    <div data-ng-controller="ChildController1"></div>
  </div>

  <div data-ng-controller="ParentController2 as parent">
    Parent value: {{ parent.value }}
    <div data-ng-controller="ChildController2 as child">
      Child value: {{ child.value }}
      Parent value: {{ parent.value }}
    </div>
  </div>
</body>
</html>

Work with Controller As Syntax
Work with Controller As Syntax
