I am building a system where the core should be able to handle different customers and I would like to be able to lazy load in a "customer specific" module that overrides templates for my different components, let's say I have a ShowBlogComponent and it has
<ng-container *ngTemplateOutlet="showblog"></ng-container>
<ng-template #showblog>
<div>SHOW MY BLOG FROM CORE</div>
</ng-template>
And then i would like to have a module MyCustomerModule where we load a new html file with:
<ng-template #showblog>
<div>SHOW MY BLOG FROM MyCustomer</div>
</ng-template>
That overrides the HTML template for that specific customer.
How can I make this happen?
How i would do it in angularJs:
templateUrl: getBlogTemplate()
function getBlogTemplate() {
if(customer)
return "customerBlogTemplate.html";
else
return "baseBlogTemplate.html";
}