1

This blog post from the Angular team has a new recommendation for app file structure.

But I do not quite understand where to put my html-partial. Take this example: I have a partial that is the html for entering and confirming a password. I use this both under signup-page and under change-password-page.

So I have this file structure:

user/signup/signup.html
user/signup/signup-controller.ja
user/change-password/change-password.html
user/change-password/change-password-controller.ja

But where would the recommended place to put my small piece of partial-html, my file: password-and-confirm-input-fields.html? It does not have a controller or anything such...

EricC
  • 5,720
  • 13
  • 52
  • 71
  • which feature does it belong to? Think of each folder as a feature, not a controller dependent space. If the file is login form, maybe it will fit right into user/login or /login for that matter. The important part is the splitting of folders, so you do not end up with folder structure like "model,view,controler" or "Services, Factories, Partials" or etc.. – Ronni Skansing Jun 09 '14 at 22:57
  • btw if its "global" it goes in the components and in an approriate named folder. – Ronni Skansing Jun 09 '14 at 23:05
  • Check this long set of recommendations for [angular app structures](http://stackoverflow.com/q/20802798/1959948) – Dalorzo Jun 09 '14 at 23:08
  • Ronny, in my example case, the password-and-confirm-partial, belongs to two features, the signup-feature and the change-password-feature. Does this make it global? They are both user-related features and my partial would not be used elsewhere... – EricC Jun 10 '14 at 09:42

0 Answers0