Used a ternary operator in place of a directive