Here is my js code
var MYModule = angular.module('myApp', ['ngRoute', 'myAppServices'])
.directive('loading', ['$http', loadingDirective])
.config(myRouter);
angular.module('myAppServices', ['ngResource'])
.factory('Users', function($resource) {
return $resource('/MY/system/users');
});
function UsersCtrl($scope, Users) {
$scope.users = Users.query();
}
in my html code just using this
<div ng-repeat="item in users">Hello</div>
Although I am getting request in my server code at /MY/system/users but the browser is throwing error
Error: [$resource:badcfg] http://errors.angularjs.org/1.2.16/$resource/badcfg?p0=array&p1=object
at Error (native)