Good day, the problem is that I make a get request, the data comes slowly and they do not have time to load together with the template, and the variable having a new value does not update it in the template. And this happens only in metronic 8 (as a confirmation, a link to the code that shows what I want to implement - https://codesandbox.io/s/naughty-bird-6p5xzz ?file=/src/app/app.service.ts). At the same time, the template updates the data to the new variable data, provided that I click on routelink. How can this be fixed?
If you're having trouble updating the template content via a variable, it might be due to how the variable is being referenced or formatted. Make sure the variable syntax matches the template's expected format. For instance, if you're working with dynamic content, double-check the placeholders. Also, if you’re using Adron Fence PVC fence options in your project, ensure the variable correctly pulls the desired specifications to display accurate fence details.
Hi,
Looks like it's the cause of the ChangeDetection strategy.
Try to follow the article: https://www.digitalocean.com/community/tutorials/angular-change-detection-strategy.
You also have to trigger this.cd.detectChanges(); after you are getting/updating data.
Regards,
Keenthemes support