<!doctype html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Example - example-example44-production</title>
  <link href="style.css" rel="stylesheet" type="text/css">

  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
  <script src="script.js"></script>

</head>

<body ng-app="scopeExample">
  <div class="show-scope-demo">
    <div ng-controller="GreetController">
      Hello {{name}}!
    </div>
    <div ng-controller="ListController">
      <ol>
        <li ng-repeat="name in names">{{name}} from {{department}}</li>
      </ol>
    </div>
    <div ng-controller="ParentController">
      <div ng-controller="ChildController">
        Hello {{name}} Son of {{fathername}}!
      </div>
    </div>
  </div>
</body>

</html>

<!-- 
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->
(function(angular) {
  'use strict';
  angular.module('scopeExample', [])
    .controller('GreetController', ['$scope', '$rootScope', function($scope, $rootScope) {
      $scope.name = 'World';
      $rootScope.department = 'Angular';
    }])
    .controller('ListController', ['$scope', function($scope) {
      $scope.names = ['Igor', 'Misko', 'Vojta'];
    }])
    .controller('ParentController', ['$scope', function($scope) {
      $scope.name = 'adel';
      $scope.fathername='adel';
    }])
    .controller('ChildController', ['$scope', function($scope) {
      $scope.name = 'mohamed';
    }])
})(window.angular);

/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/
.show-scope-demo.ng-scope,
.show-scope-demo .ng-scope  {
  border: 1px solid red;
  margin: 3px;
}

/*
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/