如何在离子框架中的行上添加图标?
How to add icon on row in ionic framework?
我正在尝试用 ionic 制作简单的演示。我有一个页脚有一个图标 ion-compose(左下角的图标)。当我单击该图标时,它会显示一个弹出屏幕,我在文本字段中输入名称并按 保存 按钮。然后它生成一行,其中的文本与弹出屏幕的文本字段中所写的文本相同。我需要在行上添加图标按钮(如删除按钮、编辑按钮)。我们可以像在页脚中那样在动态生成的行上添加图标吗(左下方的 ion-composer)?
请在行中添加离子
这是我的代码
http://codepen.io/anon/pen/qdEEPW
<ion-item ng-repeat="item in items">
{{item.testcase}}
<ion-reorder-button class="ion-navicon"></ion-reorder-button>
</ion-item>
请按页脚左侧的底部按钮。单击时会显示弹出窗口和填充条目,它会生成 row.I 需要在行中添加图标
我会显示我想要的图像
我需要行上的删除图标和编辑按钮图标..你可以从这个 link 中选择 amy 图标
http://ionicons.com/
相关:how to add icons in row which is generated dynamically in ionic
已添加图标。
您将必须为按钮添加功能。
HTML:
<ion-item ng-repeat="item in items">
{{item.testcase}}
<button class="button {{item.close}}"></button>
<button class="button {{item.edit}}"></button>
JS:
myPopup.then(function(res) {
console.log('Tapped!', res);
if(typeof res!='undefined')
res.edit="ion-edit";
res.close="ion-close";
$scope.items.push(res)
console.log($scope.items);
});
我正在尝试用 ionic 制作简单的演示。我有一个页脚有一个图标 ion-compose(左下角的图标)。当我单击该图标时,它会显示一个弹出屏幕,我在文本字段中输入名称并按 保存 按钮。然后它生成一行,其中的文本与弹出屏幕的文本字段中所写的文本相同。我需要在行上添加图标按钮(如删除按钮、编辑按钮)。我们可以像在页脚中那样在动态生成的行上添加图标吗(左下方的 ion-composer)?
请在行中添加离子
这是我的代码
http://codepen.io/anon/pen/qdEEPW
<ion-item ng-repeat="item in items">
{{item.testcase}}
<ion-reorder-button class="ion-navicon"></ion-reorder-button>
</ion-item>
请按页脚左侧的底部按钮。单击时会显示弹出窗口和填充条目,它会生成 row.I 需要在行中添加图标
我会显示我想要的图像
相关:how to add icons in row which is generated dynamically in ionic
已添加图标。 您将必须为按钮添加功能。
HTML:
<ion-item ng-repeat="item in items">
{{item.testcase}}
<button class="button {{item.close}}"></button>
<button class="button {{item.edit}}"></button>
JS:
myPopup.then(function(res) {
console.log('Tapped!', res);
if(typeof res!='undefined')
res.edit="ion-edit";
res.close="ion-close";
$scope.items.push(res)
console.log($scope.items);
});