title: Scroll to the Top of Browser on back history after DOM have been changed. In angular and angular-ui-router
body: <p>I'm not sure wherever is it bug or feature of <strong>angular</strong>, <strong>angular-ui-router</strong> or Chrome. But I've got this bug on Chrome v41 + OSX or Win7.</p>
  
  <p>It will be better to see example on planker
  <a href="http://plnkr.co/HNlXhH" rel="nofollow">http://plnkr.co/HNlXhH</a></p>
  
  <p>And use steps to reproduce it:</p>
  
  <ul>
  <li>page1: click page2 link"</li>
  <li>page2: push back on browser</li>
  <li>page1: do nothing just look</li>
  <li>page1: list will apper in 1 sec</li>
  <li>page1: we will scroll by code to the (0, 500)</li>
  <li>page1: lazy element will be added in 2 sec</li>
  <li>page1: accidently page will scroll to the top right after lazy element</li>
  </ul>
  
  <p>but also you can check them here (as you can see nothing special):</p>
  
  <pre><code>//main.js
  
  var app = angular.module('MainApp', ['ui.router']);
  
  app.config(function($stateProvider, $urlRouterProvider) {
      $urlRouterProvider.otherwise('/page1');
      $stateProvider
          .state('page1', {
              url: '/page1',
              templateUrl: 'page1.html',
              controller: 'Page1Ctrl'
          })
          .state('page2', {
              url: '/page2',
              templateUrl: 'page2.html'
          })
  });
  
  app.controller('Page1Ctrl', function($scope, $timeout, $window) {
      $timeout(function() {
          $scope.items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
          $timeout(function() {
              $window.scrollTo(0, 800);
          });
      }, 1000);
      $timeout(function() {
          $scope.lazy = true;
      }, 2000);
  });
  </code></pre>