#[Angular 8] [Not Ivy] navigating away using router.navigate() loads the previous page's style

3 messages · Page 1 of 1 (latest)

crisp pagoda
#

assume I'm in a page with a table that got border: 1px; in the css.
there's a button in that page that will run router.navigate(), and it will take me to a different page with a different table. and that page got border: none; in the css.
the second page does end up showing borders however. I read on stackoverflow that this might be a ViewEncapsulation problem. but ViewEncapsulation is not set to none, neither in the 2 pages' components, nor in their parent component.

refreshing the page shows the appropriate style.

any clue what might be happening?

indigo kiln
#

A css selector overwriting the other one, have a look at Dev tools and what css gets applied

crisp pagoda