I'm looking for a way to condition a ng-readonly
inside an ng-if
statement.. i tried it in a few way, this is my latest vesion..
ng-if="note.owner_image === user.image " ng-readonly="false"
need some assistant..
<textarea
class="wm-textarea-notes"
ng-model="noteEdit.note_value"
columns="1"
placeholder="Add a note"
ng-readonly="true"
ng-if="note.owner_image === user.image " ng-readonly="false"
ng-if="note.owner_image === "" " ng-readonly="false
></textarea>
ng-if is used to hide or show the element based on the condition given. if you want the condition to apply to ng-readonly, you should put it in the ng-readonly attribute:
<textarea
class="wm-textarea-notes"
ng-model="noteEdit.note_value"
columns="1"
placeholder="Add a note"
ng-readonly="note.owner_image !== user.image || note.owner_image !== ''">
</textarea>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With