title: Postion().top is not consistant due angular DOM still loading
body: <p>Position top is not consistant every time ,
  If user scrolls down when dom is still loading position will be different.</p>
  
  <pre><code> angular.module('users').directive('appplyProperty', ['$window', '$timeout',
          function ($window, $timeout) {
              var $win = angular.element($window);
              return {
                  restrict: 'A',
                  link: function (scope, element, attrs) {
                    var = offsetTop = element.offset().top;
  
                   $win.on('scroll', function (e) {
                      var checkTheTop = $window.scrollY - offsetTop;
                        if (checkTheTop &gt; 0) {
                           // apply css property top = checkTheTop ;
                          } else {
                          //do something
                   }
                  });
               });
            }
  }]);
  </code></pre>
  
  <p>How to make sure position is calculated only after DOM is loaded or condition that now nothing is happening in the dom calculate position ?</p>