In have an app that must have certain data downloaded before NG bootstraps, 
so I'm fetching it in a pre-NG function, and bootstrapping NG manually, 
which works fine. However, this is presenting a problem in Karma tests 
because when I run

// load angular app module beforeEach( module('clientApp') );

The run block in the app expects my data to be there and it's not, and 
fetching it fails within the karma environment. I could work around this 
easily enough if I could either:

a) alter the document object for the karma environment so that in the call 
to module the document object is already populated with starting data could 
be fetched off document._data

or 

b) alter the root scope so that when the module fires up, root scope is 
already populated with my data already in it.

Can anyone tell me if either of things are possible and if so, how?


thanks!

Iain

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