vojtajina/angular.js — comment on commit b2b37662ca20d292e54e9bb0f824e88335004822
File:  line 0
By vojtajina:

Just read the specs: http://dev.w3.org/html5/spec/Overview.html#scroll-to-the-fragment-identifier

1/ if hash empty string -> scroll to top
2/ if id element exists -> scroll to element
3/ if a with name exists -> scroll to element
4/ if hash == 'top' scroll to top
5/ do nothing

I think we might apply this logic for both cases: 1/ changing $location.hash(clicking a link or typing into address bar), 2/ after ng:include/view