I'm using Angular 8. I've downloaded the charting_library folder and datafeeds folder into the sample Angular 5 app in the "assets" folder as instructed, but I get an error on compile (ng serve).
ERROR in src/app/tv-chart-container/tv-chart-container.component.ts(114,18): error TS2339: Property 'attr' does not exist on type 'HTMLElement'.
If I comment out the .attr line, it errors on the next.
This occurs in the following code in tv-chart-container.components.ts
tvWidget.onChartReady(() => {
const button = tvWidget.createButton()
.attr('title', 'Click to show a notification popup')
.addClass('apply-common-tooltip')
.on('click', () => tvWidget.showNoticeDialog({
title: 'Notification',
body: 'TradingView Charting Library API works correctly',
callback: () => {
console.log('Noticed!');
},
}));
button[0].innerHTML = 'Check API';
});
Do you have a working example using Angular 8?
Many thanks!
I'm using Angular 8. I've downloaded the charting_library folder and datafeeds folder into the sample Angular 5 app in the "assets" folder as instructed, but I get an error on compile (ng serve).
ERROR in src/app/tv-chart-container/tv-chart-container.component.ts(114,18): error TS2339: Property 'attr' does not exist on type 'HTMLElement'.
If I comment out the .attr line, it errors on the next.
This occurs in the following code in tv-chart-container.components.ts
Do you have a working example using Angular 8? Many thanks!