AngularJS Folder Structure

when I am starting the first angularjs project, I was thinking about the better pattern for folder structure from maintainability , extendibility which can be used in small, medium, large applications, I went to ask my friend “Google”, and found that all are talking about two main pattern :

image

on the left –> By type

On the right –> By Feature (preferred)

Not too bad for smaller apps, but even here you can start to see it gets more difficult to find what you are looking for. When I want to find a specific view and its controller, they are in different folders. The idea here is that when you are looking for the code that makes a feature work, it is located in one place, Services are a bit different as they “service” many features.

ultimately how you organize your code is entirely up to you (and your team), for me I will go to structure the project by feature

It\'s only fair to share...Digg thisBuffer this pageShare on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0Pin on Pinterest0Share on StumbleUpon0Share on Tumblr0

Leave a Reply

Your email address will not be published. Required fields are marked *