How to organize my models in an Angular Cli project?

0

I would like to know if it is possible and also if it is a good practice to organize my models out of a component directory. For example:

I would like to keep my models within a directory called "models" at the same level as the "app" directory, under "src".

    
asked by anonymous 26.01.2018 / 12:03

1 answer

1

All the code in your application should be inside the src folder and the ones to your project in app .

What I do in my projects is usually to create the following structure within src :

src
    /app
        /shared/models

And in this folder model I put all models files that are shared throughout the application. What you've suggested is not entirely wrong, but you should stay within app .

    
26.01.2018 / 13:41