angular.js - The results from ng-repeat need to be processed again
伊谢尔伦
伊谢尔伦 2017-05-15 17:08:02
0
1
547
<table class="grain-record grain-list">
                <tr ng-repeat="list in prolist">
                    <td width="20%" class="text-center">{{$index+1}}</td>
                    <td width="25%" class="text-center">
                        <!--{{list.type=='1'?'签到获取': list.type=='2'?'投资获取': list.type=='3'?'推广邀请人投资获取': list.type=='4'?'注册获取': list.type=='5'?'邀请好友注册获取 ': list.type=='6'?'猫粮购买月账户': list.type=='7'?'猫粮获得利息': list.type=='8'?'猫粮提现'}}-->
                        <!--{{type}}-->
                        ***{{list.type}}***
                    </td>
                    <td width="25%" class="text-center">{{list.cat_menoy}}</td>
                    <td width="30%" class="text-center">{{list.create_time}}</td>
                </tr>
            </table>

The above code: the result list.type from ng-repeat returns a string with a value of 1-7, which corresponds to 7 methods. Now the text corresponding to 1-7 needs to be displayed on the html page. What should I do? solve?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
左手右手慢动作
<table class="grain-record grain-list">
    <tr ng-repeat="list in prolist">
        <td width="20%" class="text-center">{{$index+1}}</td>
        <td width="25%" class="text-center" ng-switch="list.type">
            <span ng-case-when="1">签到获取</span>
            <span ng-case-when="2">投资获取</span>
            <span ng-case-when="3">推广邀请人投资获取</span>
            <span ng-case-when="4">注册获取</span>
            <span ng-case-when="5">邀请好友注册获取</span>
            <span ng-case-when="6">猫粮购买月账户</span>
            <span ng-case-when="7">猫粮获得利息</span>
            <span ng-case-when="8">猫粮提现</span>
        </td>
        <td width="25%" class="text-center">{{list.cat_menoy}}</td>
        <td width="30%" class="text-center">{{list.create_time}}</td>
    </tr>
</table>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template