apexcharts / ng-apexcharts

ng-apexcharts is an implementation of apexcharts for angular. It comes with one simple component that enables you to use apexcharts in an angular project.
MIT License
329 stars 81 forks source link

Make apx-chart inputs compatible with Angular strict templates #347

Closed lztetreault-dev closed 3 months ago

lztetreault-dev commented 3 months ago

New Pull Request

The inputs for apx-chart are optional in chart.component.ts, but are not properly marked as so. This causes issues for projects/libraries using Angular's strictTemplates.

Going from this: @Input() chart: ApexChart;

To this: @Input() chart?: ApexChart; (i.e. @Input() chart: ApexChart | undefined)

This makes it so that projects/libraries using strictTemplates will not complain about undefined values being passed into inputs when the component expects that can be the case.

All changes

Fixes # (issue) N/A

Type of change

Checklist:

junedchhipa commented 3 months ago

Thanks for the contribution @ltetreault-va

lztetreault-dev commented 3 months ago

Thank you for the approval and merge @junedchhipa 😄