拾取2个图标时,离子项渲染不正确

时间:2016-02-06 11:22:47

标签: ionic-framework

有没有办法在带有星形图标的列表项目上显示正确的V形符号?

到目前为止

代码:

<ion-list>
    <ion-item class="item item-avatar item-icon-right" href="#" ng-repeat="item in reviewList" >
        <img src="img/ionic.png">
        <i class="icon ion-star energized" ng-repeat="n in [] | range: item.rating"></i><i class="icon ion-star dark" ng-repeat="n in [] | range: 5-item.rating"></i>
        <strong>{{item.title}}</strong>
        <p>{{item.review}}</p>
        <p>{{item.date}} by {{item.firstName}} {{item.lastName}}</p>
        <i class="icon ion-chevron-right icon-accessory"></i>
    </ion-item>
<ion-list>

这就是我目前所获得的:

在将item-icon-right添加到ion-tem代码和<i class="icon ion-chevron-right icon-accessory"></i>之前,一切正常。我只想添加ion-chevron-right

enter image description here

item-icon-right添加到ion-tem代码和<i class="icon ion-chevron-right icon-accessory"></i>后,所有内容都如下所示:

enter image description here

1 个答案:

答案 0 :(得分:1)

我设法通过执行以下操作来修复它:

    <ion-list>
        <ion-item class="item item item-avatar item-icon-right" href="#" ng-repeat="item in reviewList" >
            <img src="img/ionic.png">
            <p>
                <span ng-repeat="n in [] | range: item.rating" class="energized">&#9733;</span><span ng-repeat="n in [] | range: 5-item.rating" class="dark">&#9733;</span>
                <strong>{{item.title}}</strong>
                <p>{{item.review}}</p>
                <p><small>{{item.date}} by {{item.firstName}} {{item.lastName}}</small></p>
            <p>
            <i class="icon ion-chevron-right icon-accessory"></i> 
        </ion-item>
    <ion-list>