Edit in JSFiddle

/* Scrolling directive handler will be utilized in subsequent components  */
angular.module('mobilefeApp')
.directive("scroll", function ($window , $location,$rootScope) {
   return function(scope, element, attrs) {
       angular.element($window).bind("scroll", function() {


           $rootScope.$apply(function() {

               $rootScope.test= $location.path();
               console.log( $rootScope.test);
           });

       });
   };
});