I am new to angular and trying to create a new custom service and pull data on view. What may be the issue here?
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="Scripts/angular.min.js"></script>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
service data is {{serviceData}}
</body>
</html>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function ($scope, myService) {
$scope.serviceData = myService.getDetails;
});
app.factory('myService', function () {
return
{
getDetails: "I am testing service....";
};
});
</script>