You can use &&
and ||
, which will end up working just like the ternary operators.
{{item.isValid && 'Valid' || 'Invalid' }}
EDIT: Angular introduced ternary operators in 1.1.5:
{{item.isValid ? 'Valid' : 'Invalid' }}
You can use &&
and ||
, which will end up working just like the ternary operators.
{{item.isValid && 'Valid' || 'Invalid' }}
EDIT: Angular introduced ternary operators in 1.1.5:
{{item.isValid ? 'Valid' : 'Invalid' }}