I am from the world Laraveland a little new to the world Angular 2, and itβs hard for me to understand:
Is it possible to override a component or template in Angular 2, as we use to override provider / custom package views in Laravel?
This is a dummy folder structure that can express what I want to ask:
|-resources
|-assets
|-typescript
|-core
|-core.component.ts //overridded core component and template
|-core.template.html
|-Modules
|-Core
|-Resources
|-assets
|-typescript
|-core
|-core.component.ts //main module component and template
|-core.template.html
core.template.html (Original)
<div>
<p> This is a core component template</p>
<button>Click me! </button>
</div>
core.template.html (overridden)
<div>
<p> This is a overridden core component template</p>
<p> Removed the button and overridden with p-tag </p>
</div>
Hopefully I have clearly illustrated the problem I am facing.
source
share