afterglowtech / angular-detour

Lazy-loaded/runtime-configurable/server-enhanced routing for AngularJS applications
Other
51 stars 5 forks source link

angular 1.2.0rc1 breaks -- [$injector:modulerr] Failed to instantiate module #20

Closed laurelnaiad closed 11 years ago

laurelnaiad commented 11 years ago

samples/1-ui-router-compatibility does not load under angular 2.0.0rc1 unless you set a breakpoint to allow both angular and angular-detour scripts to finish loading before module initialization. This problem is probably bigger than the sample.

laurelnaiad commented 11 years ago

I haven't determined why, but apparently angular 2.0.0rc1 waits for no man! :)

It is trying to initialize the app module before the detour has finished initializing. I am not sure if this is an angular issue or a detour issue, but a workaround is to use the AMD version of detour and load it using requirejs.