On the click of a button i want the page to scroll a particular div bottom
.
The 1st time i click, the page is going to the very top and the initial url http://localhost:8000
becomes http://localhost:8000/#/bottom
(why is it not going to the div
i mentioned).
The 2nd time i click the button, the url becomes
http://localhost:8000/#/bottom#bottom
and it goes to the div bottom
(which is what i want).
How do i deal with this ?
code snippet
$location.hash('bottom');
$anchorScroll();
Thanks in advance
Do ask for more explanation if required . . .