hehe. yeah, true. and that is precisely what i'm trying to avoid, that 
extra call, as it is really not necessary.

My particular context is that I'm updating a flash app to HTML5 and the 
flash app currently uses flashVars to set initial values and parameters.

The flashVars object is already being printed in the html with PHP. So when 
the page loads, it already has all that info. The flash app has access to 
that info via the flashVars object.

I was trying to emulate something similar, by having this info in a JS 
object (or array) and supply this object to the A2 app when bootstrapping 
it.

As I see it, using $http or XMLHttpRequest or any other "after app 
initialization" method is really extra steps. Or am I to influenced by the 
flashVars object method and it's just me being stubborn by not wanting to 
let go?  lol

Regards.
Newen


On Monday, July 25, 2016 at 4:23:07 PM UTC+2, Sander Elias wrote:
>
> Hu Newen,
>
> For the sake of this argument, yes, you can see it as the same. 
> (technically, it isn't.)
>
> Thing is, it easy enough to fetch a config, but usually one needs this 
> during config/boot (before angular becomes active). At that time $http is'n 
> usable yet. So you have to use what the browser provides. If you target 
> modern browsers, you might use fetch. the goog old XMLHttpRequest is of 
> coarse also available to you. I don't mind using XMLHttpRequest directly, 
> but apparently that puts me in a minority ;)
>
> 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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to