Hello, I’m new to Angular and I’m wondering how the app structure is set up. I’ve build applications in PHP where each ‘feature’ has it’s own file with it’s objects. But I don’t feel comfortable to create a new file for each factory and then include it in the index.html. What are your suggestions?
It’s not about adding it manually. Generally it does not feel right to me to include a dozen of controllers, services and factories. But if that’s the way to go, I should get used to it ;-)
I also recommend having a look at the angular yo generator and trying to understand how it's set up, I'm fairly new to angular myself and it's helped me out a lot https://github.com/yeoman/generator-angular
Already using yeoman. I understand their scaffolding. But was wondering if the same applied to services and factories :) For now I created the services and factories directories but while creating it and adding it to the index.html I was wondering if this was the way to go.
You could also give a look at using a loader (recommending SystemJS). Then your index is not bloated with js imports (and you still can maintain modularity for debugging)
you could follow a component-per-folder architecture. Base your architecture on the ones from the angular 2 cli structure or whatever you think is best. Angular is component-oriented, so I guess grouping files by component has meaning.