Oct 4 2014 Learning Notes Angular 123456789<body class="container" ng-controller="StoreController as store"> <div class="product row"> <h3> <em class="pull-right">$</em> </h3> <button>Add to Cart</button> </div></body> 1<button ng-show="store.product.canPurchase">Add to Cart</button> 1234567891011121314(function() { var app = angular.module('gemStore', []); app.controller('StoreController', function(){ this.product = gem; }); var gem = { name: 'Azurite', price: 110.50, canPurchase: false, soldOut: true };})(); ng-hide 12345678<body class="container" ng-controller="StoreController as store"> <div class="product row" ng-repeat="product in store.products"> <h3> <em class="pull-right">$</em> </h3> </div></body> 1<em class="pull-right">{{product.price | currency </em> Pipe - “send the output into” Newer 《Node.js开发指南》 Book Note