angularjs - window.scrollBy() Not Working -
i trying scroll page on load of angularjs controller, doesnt seem work.
window.scrollby(0, scroll);
where scroll correct amount of pixel obtained local storage. think can because url contains hash this, , cannot change it:
http://localhost:8080/_user/index.html#/
is there workaround this?
function called in:
angular.element(document).ready(function () { var scroll = localstorage.getitem("scrolloffset"); window.scrollby(0, scroll); });
Comments
Post a Comment