• 网站新版上线,欢迎吐槽

angular ng-switch 简单使用

网站技术 admin 768次浏览 0个评论 扫描二维码
<tbody>
 <tr ng-repeat="page in $data">
 <td><a ng-href="#!/page/show/{{page._id}}"><span style="color: #a9b7c6;">{{</span>page<span style="color: #a9b7c6;">.</span>name<span style="color: #a9b7c6;">}}</span></a></td>
 <td><span style="color: #a9b7c6;">{{</span>page<span style="color: #a9b7c6;">.</span>create_time<span style="color: #a9b7c6;">}}</span></td>
 <td><span style="color: #a9b7c6;">{{</span>page<span style="color: #a9b7c6;">.last_modify_time}}</span></td>
 <td ng-if="page.status==4 || status=='all'"><span style="color: #a9b7c6;">{{</span>page<span style="color: #a9b7c6;">.lp_pv}}</span></td>
 <td ng-if="page.status==4 || status=='all'"><span style="color: #a9b7c6;">{{</span>page<span style="color: #a9b7c6;">.unique_visitor}}</span></td>

<span style="color: #ff0000;"> <td ng-switch on="page.status">
 <span ng-switch-when="0">草稿</span>
 <span ng-switch-when="1">待审核</span>
 </td></span><span style="color: #e8bf6a;">
</span> <td>
 <a class="hand" ng-href="#!/page/edit/{{page._id}}" ng-if="page.status == '0'"><i class="glyphicon glyphicon-edit"></i></a>
 <a class="hand" style="cursor<span style="color: #a9b7c6;">:pointer</span>" ng-click="delete(page._id,$data)" ><i class="glyphicon glyphicon-trash"></i></a>
 </td>
 </tr>
 <tr ng-show="$data.length == 0">
 <td colspan="6" class="text-center bg-warning"><span style="color: #a9b7c6;">未查询到数据!</span></td>
 </tr>
 <tr ng-show="hintMsg"><span style="color: #a9b7c6;">{{</span>hintMsg<span style="color: #a9b7c6;">}}</span></tr>
</tbody>

 


营销课堂 , 版权所有丨本网站采用BY-NC-SA协议进行授权 , 转载请注明angular ng-switch 简单使用
喜欢 (0)or分享 (0)
admin
关于作者:
营销课堂,让营销更简单!

您必须 登录 才能发表评论!