How to organize my models in an Angular Cli project?

Asked

Viewed 377 times

0

I wonder if it is possible and also if it is a good practice to organize my templates outside of a component directory. For example:

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

1 answer

1

All your application code must be inside the folder src and their projects in app.

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

src
    /app
        /shared/models

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.