Loading Google maps on one view rather then all asynchronous

66 views
Skip to first unread message

WiseWordsfromWoo

unread,
Feb 11, 2012, 1:03:06 PM2/11/12
to AngularJS
I am trying to load google maps only on the view I need it. Is there
a way to tie a script to a view via the $browser/$window method within
a controller or widget?

Vojta Jina

unread,
Feb 11, 2012, 7:47:43 PM2/11/12
to ang...@googlegroups.com
You can include the script tag in the template (you need to use real jQuery, as jqLite does not handle script tags).

Or register event handler on $afterRouteChange (if using ng:view) / onload (if using ng:include) and add the script from there...

V.
Reply all
Reply to author
Forward
0 new messages