-
Notifications
You must be signed in to change notification settings - Fork 12
/
example.html
52 lines (42 loc) · 1.4 KB
/
example.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.15/angular.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.15/angular-resource.js"></script>
<script src="angularBooter.js"></script>
<script>
//Call This At The Top Of Your Layout
myApp = new AngularBooter('myApp'); // <-- What do you want to call your ng-app?
</script>
</head>
<body ng-cloak ng-app="myApp" ng-controller="titleController">
<h1>{{message}}</h1>
<script>
myApp.controllers.titleController = function($scope) {
//Do Awesome Controller Stuff As Usual
$scope.message = 'Angular Is Alive!';
};
myApp.config.push([function() {
//Do Awesome Config Stuff As Usual
}]);
//Add A Dependency
myApp.dependencies.push('ngResource');
myApp.directives.myDirective = [function() {
return function(scope, element, attrs){
//Do Awesome Directive Stuff As Usual
};
}];
myApp.filters.myFilter = [(function(){
return function(input, attribute) {
//Do Awesome Filter Stuff As Usual
};
})];
myApp.services.myService = [function () {
return function() {
//Do Awesome Service Stuff As Usual
};
}];
//Call This At The Bottom Of Your Layout
myApp.boot();
</script>
</body>
</html>