AngularJS Folder Structure

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 :


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

Join the discussion


Instagram has returned empty data. Please authorize your Instagram account in the plugin settings .

Please note

This is a widgetized sidebar area and you can place any widget here, as you would with the classic WordPress sidebar.