Thanks for the detailed reply Sander, it's beginning to get clearer. I've 
done a bit of research and I'm starting to see that what I want is possible 
with a simple iframe; the iframe and the containing document can 
communicate with the HTML window.postMessage API. This makes packaging and 
deploying the application much easier as I can just load the iframe

Here are some links for anyone who comes across this in the future: 

   - https://developer.mozilla.org/en-US/docs/Web/API/Window.postMessage
   - http://stevehanov.ca/blog/index.php?id=109




On Tuesday, 11 February 2014 04:20:52 UTC+1, Sander Elias wrote:
>
> Hi Timmy,
> . 
> 1. Dynamically load all the scripts you need. Nicholas Zakas has a nice 
> explanation on 
> that<http://www.nczonline.net/blog/2009/07/28/the-best-way-to-load-external-javascript/>.
>  
> after you have loaded all the script you need,
> use javascript to put in some html and manually bootstrap angular.
> 2. Well this is really up to you. The even bigger challenge is, how to let 
> the the rest of the page not interfere with you ;)
> However, if you keep all your code inside iife's 
> <http://benalman.com/news/2010/11/immediately-invoked-function-expression/>and
>  
> make sure you are not depended on any globals you are reasonably safe.
> The biggest challenge you are going to face is, that the host page already 
> has an ancient angular version.
> Personally I would create a small script to set up, and communicate with 
> an i-frame that runs the actual application.
> Using this, the inpage script becomes your point of communication with 
> your app. You can define and expose a public api to your app in there.
>
> Does that answer some of your concerns? 
> If you want to dig in deeper, don't hesitate to ask!
>
> 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/groups/opt_out.

Reply via email to