In my current project, I am attempting to set a condition on an input field where if a variable equals 'view', then the readonly attribute should be added to the input.
Here is the code snippet I am currently using:
<input *ngIf="mode == 'view' readonly">
However, this implementation is not functioning as expected.
Can anyone help me identify what mistake I might be making here?