File tree Expand file tree Collapse file tree 2 files changed +42
-0
lines changed
angular-controller-example Expand file tree Collapse file tree 2 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Created by hoangnn on 29/10/2015.
3+ */
4+ ( function ( ) {
5+
6+ var app = angular . module ( 'Store' , [ ] ) ;
7+
8+ app . controller ( 'StoreController' , function ( ) {
9+ this . product = tablet ;
10+ } ) ;
11+
12+ var tablet = {
13+ name : 'iPad Air 2 64G' ,
14+ price : 499 ,
15+ description : 'The newest Apple iPad.'
16+ }
17+
18+ } ) ( ) ;
Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html ng-app ="Store ">
3+ < head lang ="en ">
4+ < meta charset ="UTF-8 ">
5+ < title > angular-controller-example</ title >
6+
7+ <!-- Vendor -->
8+ < link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css " integrity ="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ== " crossorigin ="anonymous ">
9+ </ head >
10+ < body >
11+
12+ < div ng-controller ="StoreController as store ">
13+ < h1 > {{store.product.name}}</ h1 >
14+ < h2 > $ {{store.product.price}}</ h2 >
15+ < p > {{store.product.description}}</ p >
16+ </ div >
17+
18+ <!-- Vendor -->
19+ < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.7/angular.min.js "> </ script >
20+
21+ <!-- Application -->
22+ < script src ="app.js "> </ script >
23+ </ body >
24+ </ html >
You can’t perform that action at this time.
0 commit comments