Created
June 16, 2017 19:09
-
-
Save dileeph/9602449d189a3648df47b9b738fc893c to your computer and use it in GitHub Desktop.
grunt-sample1-code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==== app.js -======= | |
var app = angular.module("app",["module1", "module2"]); | |
=== module-1.js ================ | |
var module1 = angular.module("module1",[]); | |
module1.controller("controllerOne",["$scope", function($scope){ | |
$scope.name = "Matt"; | |
}]); | |
=== module-2.js ===== | |
var module2 = angular.module("module2",[]); | |
module1.controller("controllerTwo",["$scope", function($scope){ | |
$scope.age = 3; | |
}]); | |
===== index.html ===== | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="lib/angular-1.4.8.js"></script> | |
<script src="js/app.js"></script> | |
<script src="js/module-1.js"></script> | |
<script src="js/module-2.js"></script> | |
<!-- <script src="dist/built.js"></script> --> | |
</head> | |
<body> | |
<div ng-app="app"> | |
<div ng-controller="controllerOne"> | |
{{name}} | |
</div> | |
<div ng-controller="controllerTwo"> | |
{{age}} | |
</div> | |
</div> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment