⟩ What is Angular Expression? How do you differentiate between Angular expressions and JavaScript expressions?
Angular expressions are code snippets that are usually placed in binding such as {{ expression }} similar to JavaScript.
The main differences between Angular expressions and JavaScript expressions are:
Context : The expressions are evaluated against a scope object in Angular, while Javascript expressions are evaluated against the global window
Forgiving: In Angular expression, the evaluation is forgiving to null and undefined whereas in JavaScript undefined properties generate TypeError or ReferenceError
No Control Flow Statements: We cannot use loops, conditionals or exceptions in an Angular expression
Filters: In Angular unlike JavaScript, we can use filters to format data before displaying it