Inputs are not inherited when Ivy is enabled
See original GitHub issue🐞 bug report
Is this a regression?
No
Description
We build our app with ngc and closure compiler. After enabling Ivy ngc fails almost immediately. Could not find any instructions for this case.
🔬 Minimal Reproduction
import {platformBrowser} from '@angular/platform-browser';
import {AppModuleNgFactory} from './application.module.ngfactory';
platformBrowser()
.bootstrapModuleFactory(AppModuleNgFactory)
.catch(e => console.error('Application bootstrap failed', e));
🔥 Exception or Error
[11:51:23] Spa_Source/main.aot.ts:7:34 - error TS2307: Cannot find module './application.module.ngfactory'.
7 import {AppModuleNgFactory} from './application.module.ngfactory';
🌍 Your Environment
Angular Version:
8.0.0-beta.14
Issue Analytics
- State:
- Created 4 years ago
- Reactions:13
- Comments:68 (32 by maintainers)
Top Results From Across the Web
Angular 9 with Ivy, problem when calling a function like this ...
The "unique" part is working by the way, and when I deactivate Ivy compiler (tscongif.app.json / angularCompilerOptions / enableIvy: false), ...
Read more >Component features with Angular Ivy - DEV Community
In the first release version of Ivy, component features are not publically available. ... Component mixins without inheritance or decorators.
Read more >Inherited component or directive properties not recognized ...
With IVY disabled it works fine because packages are not pre-compiled. So as a temporary solution I would suggest to disable IVY until...
Read more >Ivy compatibility guide - Angular
If you're seeing errors, first temporarily turn off Ivy in your tsconfig.json and re-start your app. If you're still seeing the errors, they...
Read more >Understand Composition and inheritance in Angular.
But the problem comes when we feel the over-dependencies in the constructor to the base class, or send values to something not related...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am confused because this works just fine when Ivy is disabled? So should we technically be adding
@Directive
to our component base classes even when not using Ivy?Doing so is a bit awkward, because then that causes two more issues:
Completely understood. However, I am very slightly nervous because there is already a prerelease for 9.0.0 and issues like this convince me that Ivy is still a ways from being ready.
@trotyl In that case, you would have to copy over the decorator (that’s what the schematic does for you automatically). It is slightly more boilerplate, but it’s more explicit, so it’s easier for anyone to look at the directive and figure out what its selector is without having to drill down the inheritance tree. You do have to know what the selector is, though. It could be an argument for another feature down the line, but probably not for v9.
In any case, thanks for pointing out the ambiguity. Seems like we need to add another FAQ to the guide about this. cc @kapunahelewong