Monday, 12 January 2015

AngularJS String to numeric (integer / float) Conversion


integer 

$scope.intValue = parseInt($scope.stringParameter);

float

$scope.floatValue = parseFloat($scope.stringParameter);

see some filter if required after conversion in float to set fraction decimal points



http://code2run.blogspot.ca/2015/01/angularjs-set-float-decimal-point-by.html


8 comments:

  1. Thank you, it solved my problem.

    ReplyDelete
  2. am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work..


    AngularJS Online Training
    AngularJS Online Training Hyderabad

    ReplyDelete