Hi I got stuck in custom service in AngularJS i prepared a code snippets as bellow
for HTML :
<div ng-controller="ctrlC">
<ul ng-repeat="x in cors">
<li>{{x.Name}}</li>
</ul>
</div>
for AngularJS Service
var app = angular.module('myApp', []);
app.service('myfuncA', function($http){
$http.get('lib/data.txt').success(function(datax){
this.dataM = datax;
}).error(function(){
var den = console.log("No Data");
this.case = den;
});
});
for controller
app.controller('ctrlC', function($scope, myfuncA){
$scope.cors = myfuncA.datax;
});
The data is not pulling up and no errors are there.