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="myfunc">
<script>
angular.module('myfunc', [])
.controller('getmyfunc', ['$scope', function ($scope) {
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
if (screen.width <= 768) {
$scope.device = "mobile device";
}
else
{
$scope.device = "tablet";
}
}
else
{
$scope.device = "desktop";
}
} ]);
</script>
<div ng-controller="getmyfunc">
<span>{{device}}</span>
</div>
</body>
</html>
The most helpful ANGULARJS solutions