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="myapp">
<script>
angular.module('myapp', [])
.controller('myscope', ['$scope', function ($scope) {
mystring = "hello";
str = angular.isString(mystring);
if (str == true) {
$scope.text = "it's a string!";
}
else {
$scope.text = "it is not a string!";
}
} ]);
</script>
<form name="myForm" ng-controller="myscope">
<span>{{text}}</span>
</form>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="//code.angularjs.org/snapshot/angular.min.js "></script>
</head>
<body ng-app="myapp">
<script>
angular.module('myapp', [])
.controller('myscope', ['$scope', function ($scope) {
str = "Hellow world!";
regex = /[a-z]/i;
if(!str .match(regex)) {
$scope.text = "not found!";
}
else {
$scope.text = "found!";
}
} ]);
</script>
<form name="myForm" ng-controller="myscope">
<span>{{text}}</span>
</form>
</body>
</html>
The most helpful ANGULARJS solutions
How to get client ip address using angularjs ?ANGULARJS Click to see more ... 19.3K 2.8K