@kendam wrote:
I have an implementation that requires querying a selector within the ion-slides and change their colours . This works as expected on the first page, but did not work on subsequent pages .
I noticed though that when sliding to another page from the page that seems not to work, it will then show at the point of transition.
This is how I am handling this
let arrs = document.querySelector('#v1') arrs.scrollIntoView(); arrs.classList.add('current-verse') arrs.setAttribute('color','primary')it scrolls to view, but the attribute and the class are not instantaneously applied on follow-up pages .
I tried to trigger update() but still did not work
this.slides.nativeElement.update().then(x=>{ arrs.scrollIntoView(); arrs.classList.add('current-verse') arrs.setAttribute('color','primary') })Even on the browser console, it does not work on the follow-up pages, but I edit the element on the browser, it works.
What is the right way to do this
Posts: 1
Participants: 1