fix(compiler): recognize @NgModule with a redundant @Injectable (#20320)
The compiler now, again, recognizes `@NgModule()` decorators on classes with a redundant `@Injectable()` decorator. Fixes: #19544 PR Close #20320
This commit is contained in:

committed by
Jason Aden

parent
cf618c564c
commit
c33a57666b
@ -709,15 +709,15 @@ export function analyzeFile(
|
||||
} else if (metadataResolver.isPipe(symbol)) {
|
||||
isNgSymbol = true;
|
||||
pipes.push(symbol);
|
||||
} else if (metadataResolver.isInjectable(symbol)) {
|
||||
isNgSymbol = true;
|
||||
injectables.push(symbol);
|
||||
} else {
|
||||
} else if (metadataResolver.isNgModule(symbol)) {
|
||||
const ngModule = metadataResolver.getNgModuleMetadata(symbol, false);
|
||||
if (ngModule) {
|
||||
isNgSymbol = true;
|
||||
ngModules.push(ngModule);
|
||||
}
|
||||
} else if (metadataResolver.isInjectable(symbol)) {
|
||||
isNgSymbol = true;
|
||||
injectables.push(symbol);
|
||||
}
|
||||
}
|
||||
if (!isNgSymbol) {
|
||||
|
Reference in New Issue
Block a user