Skip to content

Commit bd35e4c

Browse files
committed
continued practice
1 parent 3349b73 commit bd35e4c

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

index.html

+19-1
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,33 @@
88
<p>First name: <input type="text" ng-model="firstName"></p>
99
<p>Last name: <input type="text" ng-model="lastName"></p>
1010

11-
<p>{{firstName + " " + lastName}}</p>
11+
<p>{{firstName + " " + lastName | uppercase}}</p>
12+
<p>Sales: {{sales | currency}}</p>
1213

1314
</div>
1415

16+
<div data-ng-app="myApp" data-ng-controller="customersCtrl">
17+
18+
<ul>
19+
<li ng-repeat="x in names">
20+
{{ x.Name + ', ' + x.Country }}
21+
</li>
22+
</ul>
23+
24+
</div>
25+
1526
<script>
1627
var app = angular.module("myStuff",[]);
1728
app.controller("myController", function($scope){
1829
$scope.firstName = "John";
1930
$scope.lastName = "Doe";
31+
$scope.sales = 100.5;
32+
});
33+
34+
var app = angular.module('myApp', []);
35+
app.controller('customersCtrl', function($scope, $http) {
36+
$http.get("http://localhost/angular/customers.php")
37+
.success(function(response) {$scope.names = response.records;});
2038
});
2139
</script>
2240

0 commit comments

Comments
 (0)