/
web-DG-expressions-1.php
52 lines (51 loc) · 1.57 KB
/
web-DG-expressions-1.php
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
52
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example - example-guide-concepts-1-production</title>
<style>
.show-scope-demo.ng-scope,
.show-scope-demo .ng-scope {
border: 1px solid red;
margin: 3px;
}
</style>
</head>
<body ng-app="appModule">
<div ng-controller="appController">
<div>
<p>First Increment: {{::firstincrement}}</p>
</div>
<div>
<p>Second Increment: {{secondincrement}}</p>
</div>
<div>
<button ng-click="firstincrementfn(firstincrement);">First Increment</button>
</div>
<div>
<button ng-click="secondincrementfn(secondincrement);">Second Increment</button>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
<script>
angular.module('appModule', [])
.controller('appController', ['$scope', function($scope){
$scope.firstincrement = 1;
$scope.secondincrement = 1;
$scope.firstincrementfn = function(firstincrement){
var first = $scope.firstincrement++;
/*$scope.total = first + second;*/
}
$scope.secondincrementfn = function(secondincrement){
var second = $scope.secondincrement++;
/*$scope.total = first + second;*/
}
}]);
</script>
</body>
</html>
<!--
Copyright 2016 Google Inc. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
-->