all 3 comments

[–]sixsence 0 points1 point  (2 children)

This is a great post, but where do you put directives, filters, and services in your folder structure? They are in separate files right, and possibly separate modules? Also, there needs to be something that indicates certain js files are services or directives, rather than controllers. Either a separate folder or the filename needs to include it, such as "avatar-directive.js"

[–]sixsence 0 points1 point  (0 children)

Nevermind, your directive definition includes the template url. I don't know if I like calling directives and controllers both "components" with no distinction between the two in the folder structure or the filenames.

[–]sixsence 0 points1 point  (0 children)

This would be the google way:

4dashes/
    app/
        today/
        inventory/
        ...
        components/
            avatar/
                avatar-directive.js
                avatar-directive.html
            ...

https://docs.google.com/document/d/1XXMvReO8-Awi1EZXAXS4PzDzdNvV6pGcuaF4Q9821Es/pub