As we know in Angular built-in directives ngIf and ngShowHide, they simply use if expression to check boolean like below:
$scope.$watch($attr.ngIf, function ngIfWatchAction(value) {
if (value) {
}
else {
}
in which case, '' would be regarded as FALSE. As ui-ace is yet another Angular directive, users are likely to think the behavior in <ui-ace readonly="""> is totally the same as <div ng-if=""></div>. But for now it's not, we would treat empty string as TRUE.
I suppose we can just use !!value to check boolean.
As we know in Angular built-in directives ngIf and ngShowHide, they simply use
if
expression to check boolean like below:in which case,
''
would be regarded as FALSE. As ui-ace is yet another Angular directive, users are likely to think the behavior in<ui-ace readonly=""">
is totally the same as<div ng-if=""></div>
. But for now it's not, we would treat empty string as TRUE.I suppose we can just use
!!value
to check boolean.