<div> <table> <thead> <tr> <th>名称</th> <th>类别</th> <th>价格</th> <th>{{data}}</th> </tr> </thead> <tbody> <tr ng-repeat="item in phones"> <td>{{item.name}}</td> <td>{{item.category}}</td> <td>{{item.price | currency}}</td> <td> <button ng-click="deleteProduct(item)">删除</button> <a href="https://www.jb51.net/edit/{{item.id}}" ng-click="editOrCreateProduct(item)">编辑</a> <button ng-click="incrementPrice(item)">+</button> </td> </tr> </tbody> </table> <div> <button ng-click="editOrCreateProduct()">添加</button> <a href="https://www.jb51.net/article/create" ng-click="editOrCreateProduct()">Add</a> </div> </div>
单击“首页”
单击“电脑”
单击“手机”
单击“其他”