I need to pass a variable value from the parent component to the child component through an input. That is, the screenMode
value received through the above ng-container
needs to be given to the add-user child component.
<ng-container *ngIf="screenMode == screenStateEnum.ADD_USER || screenMode == screenStateEnum.EDIT_USER">
<add-user [screenMode] = "screenMode" [userId]="selectedRow?.userId" (goToUsers)="refresh()"></add-user>
</ng-container>
In add-user.component has @Input() screenMode: string;
But this input always returns 0 for EDIT_USER and 1 for ADD_USER.