fix(ivy): ensure module imports are instantiated before the module being declared (#35172)
PR Close #35172
This commit is contained in:

committed by
Misko Hevery

parent
79742a397f
commit
0cbdd54fd0
@ -289,10 +289,6 @@ export class R3Injector {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Track the InjectorType and add a provider for it.
|
||||
this.injectorDefTypes.add(defType);
|
||||
this.records.set(defType, makeRecord(def.factory, NOT_YET));
|
||||
|
||||
// Add providers in the same way that @NgModule resolution did:
|
||||
|
||||
// First, include providers from any imports.
|
||||
@ -330,6 +326,10 @@ export class R3Injector {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Track the InjectorType and add a provider for it. It's important that this is done after the
|
||||
// def's imports.
|
||||
this.injectorDefTypes.add(defType);
|
||||
this.records.set(defType, makeRecord(def.factory, NOT_YET));
|
||||
|
||||
// Next, include providers listed on the definition itself.
|
||||
const defProviders = def.providers;
|
||||
|
Reference in New Issue
Block a user