i have an angular website with multiple pages (sorry, can't link it here)
- Assume i'm in page A, and i've scrolled down somewhere (n pixels);
- There, i click a link to page B;
- Page B shows, but it's scrolled to the same hight as I was in page A (n pixels).
That's undesired: a linked page should start from its top (unless stated otherwise). I assume it stems from browser's built in functionality, e.g. a refresh operation will end up on the same scroll-position.
I tried to work around it by:
- remove all , thinking that angular's #/ navigation was trapped by an anchor. but it didn't matter.
scrolling a newly opened view on ...
- view-init
- timeout (2-5 secs)
- scope's "$on" event
but these caused page B to "jump" with noticeable delay; it bothers usability (and aesthetics).
i'm going to try to scroll to top on each link, just before going to, but it's difficult (and kind of silly)
suggestions?
edit
- this is a Single Page app.
- i have a "index.html", containing the tag.
- pages are stored as html files (in the same directory)