We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13690c2 commit 4cb49bfCopy full SHA for 4cb49bf
example-app/app.js
@@ -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
@@ -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>
11
+ <script src="../myangular.js"></script>
12
+ <script src="app.js"></script>
13
+</body>
14
+</html>
0 commit comments