-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTutorial2.js
More file actions
41 lines (27 loc) · 903 Bytes
/
Tutorial2.js
File metadata and controls
41 lines (27 loc) · 903 Bytes
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
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Lesson 2</title>
</head>
<body>
<p> not recommended </p>
<div ng-init="name = 'MyName'">
<p ng-bind="name"></p>
</div>
<br>
<div ng-init="number = 10">
<button ng-click=" number = number +3"> +3 </button>
<button ng-click=" number = number -1"> -1 </button>
<p> {{ number }} </p>
<br>
<p>show me the paragraph</p>
<input type="checkbox" ng-model="isChecked">
<p ng-if="isChecked"> YOU SEE ME! </p>
<br>
<p>show me this one</p>
<input type="checkbox" ng-model="isChecked4">
<p style="color: red" ng-show="isChecked4"> crazy eh? </p>
<br>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>