<div class="col-1" ng-repeat="goods in home.hotGoodsList"> <a "panel-grid panel-border" ui-sref="goods({ goodsId: goods.id})" <img "grid-img" ng-src="{{ ::.coverUri | goodsCoverUri }}" /> p "grid-title">{{ ::goods.name }}</pspan "grid-current-price"goods.minPrice | currency : '¥'}}spandel "grid-del-price" ng-if=.marketPrice > .minPrice"goods.marketPrice | currency : 'del </a>原文链接:https://www.f2er.com/angularjs/149637.html</div>
解释:1- ::其实是指单向绑定,一般情况下,只用于展示的东西,而不变化。
2- ui-sref = "goods({ goodsId: good.id})" 这个其实是指要跳转的路由
在app.router.js中已经定义
.state('goods',{
url: '/goods/{goodsId}',templateUrl'views/goods.html',196)">controller'GoodsCtrl',196)">controllerAs'goods',196)">data: { pageTitle: 'xxx | 商品详情' } })