AngularJS的学习

前端之家收集整理的这篇文章主要介绍了AngularJS的学习前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
<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>

</div>

解释:1- ::其实是指单向绑定,一般情况下,只用于展示的东西,而不变化。

2- ui-sref = "goods({ goodsId: good.id})" 这个其实是指要跳转的路由

在app.router.js中已经定义

.state('goods',{

        url: '/goods/{goodsId}'@H_403_166@,templateUrl'views/goods.html'@H_403_166@,196)">controller'GoodsCtrl'@H_403_166@,196)">controllerAs'goods'@H_403_166@,196)">data: { pageTitle: @H_403_166@'xxx | 商品详情' }
        }@H_403_166@)

猜你在找的Angularjs相关文章