I\'m using the angular-seed template to structure my application. Initially I put all my JavaScript code into a single file, main.js
. This file contained my mod
You get the error because you didn't define myApp.services
yet. What I did so far is putting all the initial definitions in one file and then use them in another. Like for your example I would put in:
app.js
angular.module('myApp.services', []);
angular.module('myApp',
['myApp.services',
...]);
That should get rid of the error, though I think you should have a read on the article Eduard Gamonal mentioned in one of the comments.