Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Importing modules into Angular 2 #3677


User avatar
0
bilalhaidar created

Hi,

I created a new module and imported it to AppModule (lazy load).

In this new module I needed to use [busyIf] directive. I couldn't use it without importing UtilsModule into my new module. Although UtilsModule is already imported to AppModule.

Why is that?

Thanks Bilal


3 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    because it's in utils module

    \src\shared\utils\utils.module.ts(9)

  • User Avatar
    0
    bilalhaidar created

    Yes thanks. I had to read again the documentation on NgModule. Any imports on the root module are not available to any feature module.

    Regards Bilal

  • User Avatar
    0
    alper created
    Support Team

    Hi

    Before asking question we highly recommend you to read the related docs.