I'm creating an Angular application that can be placed anywhere inside a 
regular website. To make it compatible with other Angular apps on the same 
page I remove the ng-app attribute and manually bootstrap it with:

angular.bootstrap();

I'm also using a generator that automatically puts all html templates into 
a js file using the Angular $templateCache.

But the template cache doesn't work when I bootstrap the app manually. The 
browser tries to request the templates from the server instead the template 
cache - resulting in a 404.

Just by removing the bootstrap() function and adding the ng-app attribute 
the templates get loaded from the cache correctly.

How can I use the template cache with manually bootstrapped Angular apps? 
Is that possible?


Regards,
Andreas

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