I'm trying to figure out how convert and calculate string, in this case i call an ajax "order/list" using $http.post to get a list like that, it contains 3 objects:
{
"orders":[
{
"id_order":"206",
"shipping":"100.00",
"tax":"35.00"
},
{
"id_order":"205",
"shipping":"160.00",
"tax":"16.00"
},
{
"id_order":"204",
"shipping":"100.00",
"tax":"16.00"
}
]
}
Tax is a percentage, then I use ng-repeat to display list of order:
<tr ng-repeat="order in orders">
<td>{{order.id_order}}</td>
<td>$ {{(order.shipping * (order.tax/100) ) + order.shipping }}</td>
</tr>
You see {{(order.shipping * (order.tax/100) ) + order.shipping }} that I need to convert them as number and calculate, for example, shipping is 100.00 and tax is 16.00, excepted result would be 116.00, not 16100.00