This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="StoreController as store"> | |
<h1>{{store.product.name}}</h1> | |
<h2>$ {{store.product.price}}</h2> | |
<p>{{store.product.description}}</p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tablet = { | |
name: 'iPad Air 2 64G', | |
price: 499, | |
description: 'The newest Apple iPad.' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var app = angular.module('Store', []); | |
app.controller('StoreController', function() { | |
this.product = tablet; | |
}); | |
var tablet = { | |
name: 'iPad Air 2 64G', | |
price: 499, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-controller="StoreController as store"> | |
<h1>{{store.product.name}}</h1> | |
<h2>$ {{store.product.price}}</h2> | |
</div> | |
<p>{{store.product.description}}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html ng-app="Store"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<body> | |
<script src="angular.min.js"></script> | |
<script src="app.js"></script> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body ng-controller="MyController"> | |
<script src="angular.min.js"></script> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html ng-app="tutorial"> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reviews: [ | |
{ | |
stars: 5, | |
body: "I love this product!", | |
author: "hoangn@codeaholicguy.com" | |
}, | |
{ | |
stars: 1, | |
body: "This product sucks", | |
author: "bob@hater.com" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<blockquote ng-repeat="review in product.reviews"> | |
<b>Stars: {{review.stars}}</b> | |
{{review.body}} | |
<cite>by: {{review.author}}</cite> | |
</blockquote> |
OlderNewer