首页 文章

如何在离子框架中添加行上的图标?

提问于
浏览
0

我试图在离子中进行简单的演示 . 我有一个页脚有一个图标 ion-compose (左下图标) . 当我点击该图标时会显示一个弹出屏幕,我在文本字段中输入名称,然后按 save 按钮 . 然后它生成一行,该行具有与弹出屏幕的文本字段中所写的相同的文本 . 我需要在行上添加图标按钮(如删除按钮,编辑按钮) . 我可以在动态生成的行中添加图标,就像我在页脚中做的那样(左下角离子作曲家)?

请在行上添加离子

这是我的代码

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>

请按页脚左侧的底部按钮 . 点击它显示弹出snd填充条目它生成行 . 我需要在行上添加图标我将显示图像我想要的
enter image description here
我需要删除图标并在行上编辑按钮图标..你可以从这个链接中选择amy图标http://ionicons.com/

1 回答

  • 1

    相关: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);
        });
    

    http://codepen.io/anon/pen/XbJJzO

相关问题