When I use the ngClass directive like this:
[ngClass]="{has-error: !myInput.valid}"
I get the following error:
Unhandled Promise rejection: Template parse errors: Parser Error: Missing expected : at column 5 in [{has-error: !myInput.valid}] in ...html...
How can I solve this error?