Subversion Repository Public Repository

Nextrek

@ 1051
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<!DOCTYPE html>
<html lang="it-IT">
	<head>
		<title>Prova Angular</title>
		<meta charset="UTF-8">
		<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
		<script type="text/javascript" src="./js/angTest.js"></script>
		<link rel="stylesheet" href="./css/angTest.css">
	</head>
	<body>

		<div data-ng-app="ProvaApp" data-ng-controller="ProvaCTRL">
			
			<!-- directive -->
			<p class="chapter">Directive</p>
			<p>Name : <input type="text" data-ng-model="name"></p>
			<h1>Hello {{name}}</h1>
		
			<!-- directive with initialization -->
			<p class="chapter">Directive with initialization</p>
			<p>The name is <span data-ng-bind="firstName"></span></p>
			
			<!-- expression -->
			<p class="chapter">Expression</p>
			<p>My first expression: {{ 5 + 5 }}</p>
			
			<!-- Controller -->
			<p class="chapter">Controller</p>
			<div>
				First Name: <input type="text" data-ng-model="firstName"><br>
				Last Name: <input type="text" data-ng-model="lastName"><br>
				<br>
				Full Name: {{firstName + " " + lastName}}
			</div>
			
			<!-- expression with numbers-->
			<p class="chapter">Expression with numbers</p>
			<p>My first expression: {{ temp1 + temp2 }}</p>
			
			<!-- expression with numbers and bind-->
			<p class="chapter">Expression with numbers and bind</p>
			<p>Total in dollar: <span ng-bind="temp1 + temp2"></span></p>
			
			<!-- expression with strings-->
			<p class="chapter">Expression with strings</p>
			<p>My first expression: {{ firstName + " " + surName }}</p>
			
			<!-- expression with strings and bind-->
			<p class="chapter">Expression with strings and bind</p>
			<p>My first expression with bind: <span ng-bind="firstName + ' ' + surName"></span></p>
			
			<!-- expression with Object-->
			<p class="chapter">Expression with Object</p>
			<p>The name is {{ person.surname }}</p>
			
			<!-- expression with Object and bind-->
			<p class="chapter">Expression with Object and bind</p>
			<p>The name is <span ng-bind="person.surname"></span></p>
			
			<!-- expression with Array-->
			<p class="chapter">Expression with Array</p>
			<p>number is {{ numbers[3] }}</p>
			
			<!-- expression with Array and bind-->
			<p class="chapter">Expression with Array and bind</p>
			<p>number is <span ng-bind="numbers[3]"></span></p>
			
			<!--Directive and ng-model-->
			<p class="chapter">Directive and ng-model</p>
			<div>
				Quantity: <input type="number" ng-model="temp1">
				Price: <input type="number" ng-model="temp2">
				<p><b>Total in dollar:</b> {{temp1 * temp2}}</p>
			</div>
			
			<!--Directive ng-model and array-->
			<p class="chapter">Directive ng-model and array</p>
			<div> <!-- data-ng-init="names=['Jani','Hege','Kai']" -->
				<p>Looping with ng-repeat:</p>
				<ul>
					<li data-ng-repeat="x in names">
					{{ x }}
					</li>
				</ul>
			</div>
			
			<!--Directive ng-model and Objects-->
			<p class="chapter">Directive ng-model and Objects</p>
			<div>
				<p>Looping with objects:</p>
				<ul>
				  <li ng-repeat="x in names2">
				  {{ x.name + ', ' + x.country }}</li>
				</ul>
			</div>
			
			<!--Directive personalizzata-->
			<p class="chapter">Directive personalizzata</p>
			<marco-directive></marco-directive>
			<div marco-directive></div>
			
			<!--Controller properties and function-->
			<p class="chapter">Controller properties</p>
			<div>
				Full Name: {{fullName()}}
			</div>
			
			<!-- Controller with filter uppercase-->
			<p class="chapter">Controller with filter uppercase</p>
			<div>
				First Name: <input type="text" data-ng-model="firstName"><br>
				Last Name: <input type="text" data-ng-model="lastName"><br>
				<br>
				Full Name: {{firstName + " " + lastName | uppercase}}
			</div>
			
			<!-- Controller with filter lowercase-->
			<p class="chapter">Controller with filter lowercase</p>
			<div>
				First Name: <input type="text" data-ng-model="firstName"><br>
				Last Name: <input type="text" data-ng-model="lastName"><br>
				<br>
				Full Name: {{firstName + " " + lastName | lowercase}}
			</div>
			
			<!-- Expression with numbers and bind and filter currency-->
			<p class="chapter">Expression with numbers and bind and filter currency</p>
			<p>Total in dollar: <span ng-bind="temp1 + temp2 | currency:'€':2"></span></p>
			
			<!--Directive ng-model and Objects and filter orderby-->
			<p class="chapter">Directive ng-model and Objects and filter orderby</p>
			<div>
				<p>Looping with objects:</p>
				<ul>
				  <li ng-repeat="x in names2 | orderBy:'country'">
				  {{ x.name + ', ' + x.country }}</li>
				</ul>
			</div>
			
			<!--Directive ng-model and Objects and filter orderby and filter input-->
			<p class="chapter">Directive ng-model and Objects and filter orderby and filter input</p>
			<div>
				<p>Filtering input:</p>
				<p><input type="text" ng-model="test"></p>
				<ul>
				  <li ng-repeat="x in names2 | filter:test | orderBy:'country'">
				  {{ x.name + ', ' + x.country }}</li>
				</ul>
			</div>
			
			<!--XMLHttpRequest-->
			<p class="chapter">XMLHttpRequest</p>
			<ul>
			  <li ng-repeat="x in names3 | orderBy:'Name'">
				{{ x.Name + ', ' + x.Country }}
			  </li>
			</ul>

			<!--Tables with css and filters (orderBy, Uppercase e Lowercase) e index and ng-if-->
			<p class="chapter">Tables with css and filters (orderBy, Uppercase e Lowercase) e index and ng-if</p>
			<div>
				<table>
				  <tr ng-repeat="x in names3 | orderBy:'Name'">
					<td ng-if="!(($index+1)%5)" style="background-color:red;">{{ $index + 1 }}</td>
					<td ng-if="(($index+1)%5)">{{ $index + 1 }}</td>
					<td>{{ x.Name | uppercase}}</td>
					<td>{{ x.Country | lowercase}}</td>
				  </tr>
				</table>
			</div>

			<!--disabled directive-->
			<p class="chapter">disabled directive</p>
			<p>
			<button ng-disabled="mySwitch">Click Me!</button>
			</p>
			<p>
			<input type="checkbox" ng-model="mySwitch"/>Button
			</p>
			<p>
			{{ mySwitch }}
			</p>
			
			<!--hide directive-->
			<p class="chapter">hide directive</p>
			<button ng-click="toggle()">Hide user</button>

			<p ng-hide="myVar">
			First Name: <input type=text ng-model="firstName"><br>
			Last Name: <input type=text ng-model="lastName"><br><br>
			Full Name: {{firstName + " " + lastName}}
			</p>
			
		</div>
	</body>
</html>

Commits for Nextrek/Marco/index.php

Diff revisions: vs.
Revision Author Commited Message
1051 MOliva picture MOliva Wed 30 Dec, 2015 16:51:13 +0000