Organizing Angular 2 projects by feature

InstructorJohn Lindquist

Share this video with your friends

Send Tweet

This lessons shows one way to structure your project by feature and how all you need to do is update your import statements.

Kevin
~ 5 years ago

I think this is pretty good since it's obviously a tiny "app". My thoughts were a little different on organization though. Say if your app had a Home page. Top level may be app/home. Inside this folder you would have home-page.html and home-page.ts. Inside this folder you'd have a components folder, inside that you have a login folder with a login-component.html and login-component.ts and login-vm.ts (for the viewmodel). So I would keep the model file in with the component, not with the service folder. Then have a register folder, etc. Something like navigation bar, you could keep in app/shared, perhaps.