Welcome aboard! We are happy you are here and wish you good net-raft!
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="//code.angularjs.org/snapshot/angular.min.js "></script>
</head>
<body ng-app="getfunc" >
<div ng-controller="myfunc">
<button ng-click='go()'>click</button></br>
<div>Result:</div></br>
<span>{{str}}</span>
</div>
<script>
angular.module('getfunc', [])
.controller('myfunc', ['$scope', function ($scope) {
str = "Hello #,'+()$ world!";
str = str.replace(/[&\/\\#,'+()$=~%!.'":*?<>{}]/g, '');
$scope.go = function () {
$scope.str = str;
}
} ]);
</script>
</body>
</html>
The most helpful ANGULARJS solutions
How to get client ip address using angularjs ?ANGULARJS Click to see more ... 19.6K 2.8K