Recommended location for Domain Model classes

By : Martin
Source: Stackoverflow.com
Question!

I am learning Angular 2 and I am using angular-cli to generate components and services. I am using the directory structure proposed by angular-cli (see screenshot below). I need to add some domain model object (e.g. User, Profile, etc.), but I don't know where to put them.

What is the recommended location for those objects in the directory structure?

Project structure

By : Martin


Answers

If the domain model classes are used by all the components, it can be put in a model.ts file within shared folder.

By : Jigar


This video can help you solving your question :)
By: admin