File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 8
8
< p > First name: < input type ="text " ng-model ="firstName "> </ p >
9
9
< p > Last name: < input type ="text " ng-model ="lastName "> </ p >
10
10
11
- < p > {{firstName + " " + lastName}}</ p >
11
+ < p > {{firstName + " " + lastName | uppercase}}</ p >
12
+ < p > Sales: {{sales | currency}}</ p >
12
13
13
14
</ div >
14
15
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
+
15
26
< script >
16
27
var app = angular . module ( "myStuff" , [ ] ) ;
17
28
app . controller ( "myController" , function ( $scope ) {
18
29
$scope . firstName = "John" ;
19
30
$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 ; } ) ;
20
38
} ) ;
21
39
</ script >
22
40
You can’t perform that action at this time.
0 commit comments