Angular: Empty Fiddle

http://angularjs.org/

by Yaprak Ayazoğlu

HTML

<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.16/angular.min.js"></script>
<div ng-controller="MyCtrl">
  Hello, {{name}}!
</div>

<div ng-controller="AnotherCtrl">
  Hello, {{name}}!
</div>

JavaScript

var myApp = angular.module('myApp',['myModule', 'anotherModule']);

var myModule = angular.module('myModule', []);

myModule.controller( 'MyCtrl', [ '$scope', function($scope) {
    $scope.name = 'Superhero';
    console.log("My module");
} ])

var anotherModule = angular.module('anotherModule', []);

anotherModule.controller( 'AnotherCtrl', [ '$scope', function($scope){
     $scope.name = 'Hero';
     console.log("Another Module");
}]);