i want to trim the characters from the string . my output string is "Val:980". i need to trim the first 4 letters so that i will get 980 only.
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$http.get('https://example.com', {
headers: {
'Authorization': 'Basic fakjle=='
}
}).then(function(response) {
$scope.names = response.data;
$scope.decodedFrame = atob($scope.names.dataFrame) //Val:980 });
});
});
</script>
<div ng-app="myApp" ng-controller="myCtrl">
<table>
<tr>
<td> {{decodedFrame} </td>
</tr>
</table>
</div>
substrorsubstringshould do the job. Or you could go forsplitor a regex if you're not actually sure about the length of the prefix.