Passing Boolean Value Into Directive

what you are doing wrong is

readOnly:'@'

this means readOnly will be a string, to make it a js variable try

readOnly:'='

then

<div single-view-card read-only="{{false}}"/>

should be

<div single-view-card read-only="true"/>

you need to show more code, this can be part of the error but I think there is more

Leave a Comment