I am currently importing a third party component. For my use case I need to override that specific component template.
Since this is a third party component, and imported via npm package, I don't want to change the component so I don't have to update it everytime the package is updated.
Is there any way to overwrite the template of another component?
I know you can use <ng-content>
if you want to inject some element. But here is not viable.
The html is something like this:
<third-party-component [items]="items" [example]="example">
The controller is something like this:
import {THIRD_PARTY_DIRECTIVES} from 'ng2-select/ng2-select';
@Component({
selector: 'example-component',
directives: [THIRD_PARTY_DIRECTIVES]
})
export class Example {
private items: Array<string> = [
'whatever', 'whatever2', 'whatever3'
];
}
Is there any way I can specify the template I want for <third-party-component>
without editing that specific component declaration? Or even extend it only ?