Skip to content

Commit

Permalink
Example App
Browse files Browse the repository at this point in the history
  • Loading branch information
teropa committed May 30, 2016
1 parent 1f4cae4 commit d4958af
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions example-app/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
angular.module('myExampleApp', [])
.controller('ExampleController', function() {
this.counter = 1;
this.increment = function() {
this.counter++;
};
this.decrement = function() {
this.counter--;
};
});
14 changes: 14 additions & 0 deletions example-app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
</head>
<body ng-app="myExampleApp">
<div ng-controller="ExampleController as ctrl">
{{ctrl.counter}}
<button ng-click="ctrl.increment()">+</button>
<button ng-click="ctrl.decrement()">-</button>
</div>
<script src="../myangular.js"></script>
<script src="app.js"></script>
</body>
</html>

0 comments on commit d4958af

Please sign in to comment.