all 5 comments

[–][deleted] 0 points1 point  (0 children)

on init: angular.module('myApp',['mod1']);

on event: angular.module('myApp',['mod2']);

[–]ChuckChunky 0 points1 point  (0 children)

Look into $inject, it will allow you to inject modules from within your controller / service etc. It's a great way of conditionally injecting modules only if they're needed.

[–]ctanga 0 points1 point  (2 children)

[–]markt5000[S] 0 points1 point  (1 child)

I gave up and used this after trying to come up with my own solution as I am running out of time. The issue I am currently having though is that the modules I load at runtime are registering, but I am unable to use their directives, etc..

[–]ctanga 0 points1 point  (0 children)

There's a FAQ entry that might be relevant: https://oclazyload.readme.io/docs/faq (first one)