如何在离子中乘以2个值 [英] How to multiply 2 values in ionic

查看:105
本文介绍了如何在离子中乘以2个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Guys,你好吗。我希望你会很好我开始我的新离子项目并且项目运作良好但是我有一个乘法问题你可以指导我如何在离子中总结2个值并显示在第3页

Hello Guys, How are you.I hope you will be fine guys I have started my new ionic project and the projects is working well but I have an issue with multiplication can you please guide me how can I sum 2 values in ionic and show in 3rd

<td>{{item.item_qty}}</td>




<td>{{item.product_price}}</td>



i希望将这2个值相乘并显示在第3个

谢谢



我的尝试:




i want to multiply this 2 values and show in 3rd
Thanks

What I have tried:

<ion-view style="" class=" " id="page10" title="Orders">
    <ion-content class="has-header" padding="true">
 <ion-refresher
    pulling-text="Pull to refresh..."
    on-refresh="doRefresh()">
  </ion-refresher>
        <style>
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2}

th {
    background-color: #4CAF50;
    color: white;
}
</style>
        <div style="overflow-x:auto;">
     <table>
  <thead>
    <tr>
      <th width="200">Product Qty</th>
      <th>Product Name</th>
      <th width="150">Status</th>
      <th width="150">Total</th>
    </tr>
  </thead>
  <tbody>
    <tr ng-repeat="item in orders" class="animated fadeInUp">
      <td>{{item.item_qty}}</td>
      <td>{{item.product_name}}</td>
      <td>{{item.status}}</td>
      <td>{{item7.product_price}}</td>
    </tr>
  </tbody>
</table>
</div>

    </ion-content>
</ion-view>

推荐答案

在你的代码中我看到这一行

In your code i see this line
<td>{{item7.product_price}}</td>

它有7个号码删除,你可以写下面的代码来乘以:

it has 7 number remove that and you can write below code to multiply:

<td>{{item.item_qty * item.product_price}}</td>


这篇关于如何在离子中乘以2个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆