angular - Expression has changed after it was checked -- ngClass change -
i'm not expert in angular2. know how resolve error:
inline template:0:6332 caused by: expression has changed after checked. previous value: 'btn-disabled'. current value: ''. [ngclass]="!formvalid() ? 'btn-disabled': ''"
what's ideas error ?
try use:
[class.btn-disabled] = "!fromvalid()"
when use [ngclass]
, should return {class-name: true/false} map.
for example:
[ngclass]="{active: isactive, disabled: isdisabled}"
Comments
Post a Comment