I just copy the function in the embed script found here (https://www.tradingview.com/widget/advanced-chart/) into a component in my Angular 5 app, and include the source scr
in component's ts-file:
declare const TradingView: any;
and in ngAfterViewInit() I putted new TradingView.widget(...) inside setTimeout
ngAfterViewInit()
new TradingView.widget(...)
setTimeout
And that's it! It works.