The directive usage is very similar to the service. The main interest here is that the content will be included and compiled once your modules have been loaded.
This means that you can use directives that will be lazy loaded inside the oc-lazy-load directive.
Use the same parameters as a service:
<div oc-lazy-load="['js/testModule.js', 'partials/lazyLoadTemplate.html']"> <!-- Use a directive from TestModule --> <test-directive></test-directive> </div>
You can use variables to store parameters:
$scope.lazyLoadParams = [ 'js/testModule.js', 'partials/lazyLoadTemplate.html' ];
Updated less than a minute ago