2016-04-07 42 views
0

在我的购物车应用程序中,我从服务器获取价格和百分比的报价。 我需要用价格区分价格价值和百分比值。和%。如何区分Rs和%值?

这是我在控制器代码:

if(result.type == 'Price'){          
            $scope.invoice_amt = $scope.invoice_amt - result.offer ;                      
            } 
            else if(result.type == 'Percentage'){          
            $scope.invoice_amt = $scope.invoice_amt * result.offer/100;                      
            } 

我正在HTML中的值作为{{invoice_amt}} 如何显示在RS报价。和百分比。

回答