I want to recompile / compile the template of my component. I am loading an external module with $onInit, and things just show up when I navigate somewhere else in the page and then back again to the page that loads the module.
I thought that I maybe could compile the template. Do you know a way how I could do that?
Edit:
If I use compile in my code, nothing happens
controller: {
$onInit(){
this.$ocLazyLoad.load('some.module.js');
}
},
template:
'<p>Sample text here</p>',
compile: function (tElement, tAttrs) {
return function(scope) {
scope.widgetCenter = tAttrs.widgetCenter;
};
}