convert string to number typescript code example
Example 1: string to number angularjs
parseInt(....)
Example 2: string to int typescript
Number('123') //123
Number('xxx') //NaN
Example 3: typescript string to number
var x = "32";
var y: number = +x;//the "+" converts string to number
Example 4: typescript cast string to number
var x = "32";
var y = +x; // y: number