How to parseInt in Angular.js

前端 未结 7 1671
生来不讨喜
生来不讨喜 2020-11-28 13:07

Probably, it is the simplest thing but I couldn\'t parse a string to Int in angular..

What I am trying to do:



        
7条回答
  •  庸人自扰
    2020-11-28 14:04

    
    
    
    Total: {{num1 + num2}}
    

    and in js :

    parseInt($scope.num1) + parseInt($scope.num2)
    

提交回复
热议问题