Cleanup error: no module: Angularjs users

this is the next question about this How to get index data in Angular using rails server

Question How to load / link Angular module with html?

After the accepted answer and updating the code, I can not load the module users:

Uncaught Error: No module: users 

Gist from my project here

updated code:

 app.factory('User', function($resource) { return $resource "users/:id", { id: '@id' }, { index: { method: 'GET', isArray: true, responseType: 'json' }, show: { method: 'GET', responseType: 'json' }, update: { method: 'PUT', responseType: 'json' } } }) var UsersIndexCtrl = function($scope, User) { $scope.users = User.index(); }; 

updated plunker according to accepted answer here

0
source share
1 answer

You have syntax errors with the following

 return $resource "users/:id", { id: '@id' }, { ... } 

Must be

 return $resource("users/:id", { id: '@id' }, { ... }); 
0
source

Source: https://habr.com/ru/post/1497835/


All Articles