Undefined variable in component
I'm getting a lot of my variables undefined and ran at times when they shouldn't run. My best guess is that it is related to the way I make the Api call.
When I run the program, the console statements doesn't get printed on chrome but on edge??
When I start the problem I get the error ERROR TypeError: Cannot read properties of undefined (reading 'trim') in app.component.ts ngOnInit() when I try to read csv. The csv are not empty and this method works as expected to load the csv into the arrays
When I click view for Stock symbol, the chart displays as expected, but I get loader.js:98 ERROR Error: Uncaught (in promise): TypeError: Cannot use 'in' operator to search for 'Time Series (5min)' in undefined. In debug, I can see this line console.log("data", this.data); in chart.componenet.ts ran 3 times in total when it should only run once when the api call in app.component.ts generate_stock_chart has the data ready which then sends the data to chart.component.ts
The same problem in 3) applies for forex
stackblitz url - stackblitz.com/github/Fennzo/AdvantageAPI
0 Replies