In my angular 15 app I have many components that use the same template, by referencing to the same template file in TemplateUrl.
for example:
@Component({
selector: 'app-my-comp',
templateUrl:'../../myTemplate.html',// this is a common template,
})
export class MyComponent {
}
For some reason I need to take the myTemplate.html of the app, and set it in an external library in my project.
How can I export a HTML template from a library (in a library's public API I can export only ts files)?
How can I use it in the TemplateUrl of
MyComponentcomponent?