0

I am not sure when I have to import (e.g. a service) in app.module.ts and when should I not import it in app.module.ts but rather import it directly into a particular page.module.ts?

1 Answer 1

1

As a rule of thumb, you should import as little as possible into the app.module.ts. However, things you need over the entire app, like for example a storage module (accessing the same storage over the whole app), language module (accessing the same language over the whole app), routing module (...) and so on, needs to be within the app.module.ts.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.