artch/angular-route-segment

with multiple segment, updating parent scope works, but gets destroyed on reloading the parent url?

Opened this issue · 0 comments

I have a segment within another segment, but mine are overlapping modals.
The main page /
The first modal /exploration/{id}/show
The second modal /exploration/{id}/knowledge/new

Now in the second modal, when I use $scope.$parent I can update the $scope variables from the first modal as intended. I can directly see those changes (since the second modal is much smaller)

However when I close my second modal, which basically does $location.path("/exploration/1/show"); and $rootScope.$apply();, the $scope on the first modal somehow gets re-initialized and cleared to it's original.

I understand that I may be using this library a bit outside it's intended scope, but I still hope you can point me in the right direction how to prevent the $scope from rebuilding when it's not necessary (the first modal never changes and it also doesn't seem that your code is reloading the url.. so why is the $scope destroyed and rebuild? I can't find in your code how that happens..

Thanks in advance! Great job with this project!