angular: [Ivy] Compile Error with ngx-charts
🐞 bug report
Affected Package
Ivy Template Compiler
Is this a regression?
"angularCompilerOptions": {
"enableIvy": true // no work
"enableIvy": false // work
}
Description
Doesn’t compile project
🔬 Minimal Reproduction
https://github.com/vdumbrav/angular-ivy-ngx-charts
🔥 Exception or Error
https://i.ibb.co/z5VZn7M/Screenshot-2019-05-16-16-42-06.png https://pastebin.com/PRVaP7n9
🌍 Your Environment
Angular Version: Angular CLI: 8.0.0-rc.4 Node: 10.15.3 OS: linux x64 Angular: 8.0.0-rc.4 … animations, cli, common, compiler, compiler-cli, core, forms … language-service, platform-browser, platform-browser-dynamic … router, service-worker
Package Version
@angular-devkit/architect 0.800.0-rc.4 @angular-devkit/build-angular 0.800.0-rc.4 @angular-devkit/build-optimizer 0.800.0-rc.4 @angular-devkit/build-webpack 0.800.0-rc.4 @angular-devkit/core 8.0.0-rc.4 @angular-devkit/schematics 8.0.0-rc.4 @angular/pwa 0.12.4 @ngtools/webpack 8.0.0-rc.4 @schematics/angular 8.0.0-rc.4 @schematics/update 0.800.0-rc.4 rxjs 6.4.0 typescript 3.4.5 webpack 4.30.0
Anything else relevant?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 12
- Comments: 16 (5 by maintainers)
This is caused by a bug in the template compiler, see #32061, for which I opened a fix in #33555.
I have not targeted that PR to fix this issue, as I have not confirmed that there aren’t additional issues with ngcc that may still cause breakages.
Actually, this might be an issue with ngcc.
After @JoostK’s fixes,
ngx-charts
is showing as fixed in our validation repo. Please feel free to file a new issue if there are still problems with the library 😃I have an update.
It seems the application compiles fine with Ivy, but it does not run in the browser with Ivy at version 9.0.0-next.3.
This is reproducible:
https://stackblitz.com/edit/vertical-bar-chart-box89u
1- Just download the project to your machine 2 - npm install 3 - ng serve 4 - See the browser console
Is Ivy able to handle SVG properly?
Regards
To provide some more info:
These are the files that are important:
https://github.com/swimlane/ngx-charts/blob/master/src/bar-chart/bar-vertical.component.ts#L32
The
xScale
is defined by thengx-charts-x-axis
directive:https://github.com/swimlane/ngx-charts/blob/master/src/common/axes/x-axis.component.ts#L15
Can we re-open this?
Regards