0

I have a container containing a navigation bar on left. First time you click on any item in navigation bar on left, it triggers an iframe which has an angular app hosted in it. Each subsequent time you click on an item in navigation bar, the hash value of url of iframe changes. I am trying to capture hash change event in my angular application which is inside that iframe. The thing is everytime I click on left pane navigation bar item, the angular application reloads itself, not sure why that happens because all that is changing is the hash value in the url. Any ideas on how to prevent the reload and how to capture the hash change in angular?

I did try

function MyCtrl($route, $scope) {
 var lastRoute = $route.current;
 $scope.$on('$locationChangeSuccess', function(event) {
 $route.current = lastRoute;
 });
}

This was one of the answers in AngularJS Paging with $location.path but no ngView reload

Would be great if someone can please point me to right direction. Thanks !

Community
  • 1
  • 1
Tejas
  • 227
  • 3
  • 14

0 Answers0