In component.ts
<div *ngIf=“isSearch”>
…
<div *ngIf="!isSearch">Content
In component2.ts
<div *ngIf=“isSearch”>
…
<div *ngIf="!isSearch">Content
I want to reuse the code in *<div ngIf=“isSearch”> for component2.ts without repeat it. How can I do it ?