2
Hello. I use version 8.1.3 of Angular in my project and am having some problems creating an anchor effect on the product card that is dynamically loaded onto the screen. I tried using old html with href pointing to the product ID, but to no avail. I also tried one or other library ready to make use of scrollTo() in other ways but also without success. Has anyone ever done anything like this or has any idea how to do it in a spa?
<app-card-produto *ngFor="let p of e.produtos"[produto]="p"">
</app-card-produto>
This is the card I have on my catalog screen. The behavior I need is to enter the detail screen of the product, but when returning, the page scrolls to the card that has the ID (or other identifier that is needed) which I finished last. The good part of this is that when I return from the detail screen, I already have the API query ready, IE, the cards just need to be rendered, I already have the entire list of products saved in Indexeddb.
I am totally running away about using jquery, I think there should be a solution to this without needing it, but in an extreme case I can surrender on this.