I have an Angular 8
app.
Following the below article I got an understanding of ContentChildern
, QueryList
etc. & build a sample tabs component.
https://juristr.com/blog/2016/02/learning-ng2-creating-tab-component/
This is how my app component with tabs looks like
//our root app component
import { Component, ViewChild } from '@angular/core';
import { TabsComponent } from './tabs/tabs.component';
@Component({
selector: 'my-app',
template: `
<my-tabs>
<my-tab [tabTitle]="'Tab 1'">
Tab 1 content
</my-tab>
<my-tab tabTitle="Tab 2">
Tab 2 content
</my-tab>
</my-tabs>
`
})
export class AppComponent { }
But I have lengthy HTML template as each tab content rather a simple string.
How do I point to an HTML template as Tab content against each tab? Something like below
<my-tab [tabTitle]="'Tab 1'">
//templateUrl -> tab1.content.html
</my-tab>
Thanks!