Skip to content

Commit 4cb49bf

Browse files
committed
Example App
1 parent 13690c2 commit 4cb49bf

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

example-app/app.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
angular.module('myExampleApp', [])
2+
.controller('ExampleController', function() {
3+
this.counter = 1;
4+
this.increment = function() {
5+
this.counter++;
6+
};
7+
this.decrement = function() {
8+
this.counter--;
9+
};
10+
});

example-app/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
</head>
5+
<body ng-app="myExampleApp">
6+
<div ng-controller="ExampleController as ctrl">
7+
{{ctrl.counter}}
8+
<button ng-click="ctrl.increment()">+</button>
9+
<button ng-click="ctrl.decrement()">-</button>
10+
</div>
11+
<script src="../myangular.js"></script>
12+
<script src="app.js"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)