I have a component (componentA) that is using another component (componentB) in its HTML. ComponentB has a button where the title is something else, but I would like to change the name of the button in ComponentA.
ComponentA uses componentB button to navigate to another page, but ComponentB has button that opens up a form. The navigation works and everything, but I would just like to change the name of the buttons when its on different page.
ComponentA.html
<div>
<component-b (click)="buttonEdit()"></component-b>
</div>
ComponentA.ts
public buttonEdit(): void {
this.router.navigate(['/users']);
}
ComponentB.html
<button (click)="openModal()">Add Users</button>
ComponentB.ts
@Input() buttonEdit: () => void;