After removing the otherwise route I got to see PhotoSwipe adding query 
params to the url based on gallery stuff. That seemed to be causing a route 
reload and redirect, which added query params, which reloaded, which 
redirected and so on. Turns out it's PhotoSwipe and there's a simple 
solution. history: false

https://github.com/dimsemenov/PhotoSwipe/issues/580

Alistair


On Monday, July 27, 2015 at 4:02:29 PM UTC+1, [email protected] wrote:
>
> thanks Sander but that's what I do. I took the document onready code out 
> to a separate function and call it from viewContentLoaded. That's when I 
> get the infdig error. The javascript in PhotoSwipe seems to cause the 
> angular view to reload, which calls viewContentLoaded, which tells 
> PhotoSwipe to init which causes angular to reload...
>
> Alistair
>
>
> On Monday, July 27, 2015 at 3:44:24 PM UTC+1, Sander Elias wrote:
>>
>> Hi Alistair,
>>
>> Have a look at the $viewContentLoaded event of ngView 
>> <https://docs.angularjs.org/api/ngRoute/directive/ngView>.
>>
>> In your controller you can do something like:
>> $scope.on('$viewContentLoaded',function () {
>>    //kick of your 3rth party thing.
>> })
>>
>> Does that help you a bit?
>> Regards
>> Sander
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to