Hello, 

Did you found the answer to this question?


2013 m. lapkritis 5 d., antradienis 17:11:38 UTC+2, Gerardo Curiel rašė:
>
> Hello list.
>
>
> I'm using AngularJS 1.0.8 and PJAX via jquery-pjax[0]. Before you smash me 
> for 'doing it wrong', this app is an pjax app with some widgets that I 
> developed using AngularJS.
>
> Now, every time that I go to another page, I need to re-bootstrap the 
> angularjs app, like this (for turbolinks, the event is page:load):
>
>   $(document).on('pjax:success', () ->
>         angular.bootstrap($("#container-pjax")[0], ['mainApp'])
>   )
>
> This was working as intended, until I decided to upgrade to AngularJS 1.2. 
> This commit [1] breaks that flow. The error is: "Uncaught Error: 
> [ng:btstrpd] App Already Bootstrapped with this Element '<div 
> id="container-pjax" class="main-container ng-scope">'"
>
> I see the reasoning behind this decision (re-bootstrapping may lead to 
> some weird behavior, etc) but I think this is still a valid use case. PJAX 
> and Turbolinks (even more) are widely used techniques.
>
> Is the any other way to re-bootstrap an angularjs app and make pjax apps 
> work again? I mean, other than getting back to 1.0.x.
>
> References:
> [0]: https://github.com/defunkt/jquery-pjax
> [1]: 
> https://github.com/angular/angular.js/commit/3ee744cc63a24b127d6a5f632934bb6ed2de275a
>
> Saludos
>
> --
> Gerardo
>

-- 
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