Use different interpolation syntax for Angular data binding

In Angular, you can use interpolation syntax for data binding for an expression as {{ expression}}.

You can use inline expression or member variable inside {{ }} interpolation operator.

Sometimes, you would like to use different interpolation characters instead of {{ }} for data binding. For example [ expession ]. You can configure such setting per Component by specifying interpolation property of @Component decorator.

For example, here is custom interpolation with [ expression ] syntax.

Reserved interpolation characters

0: /^\s*$/1: /[<>]/2: /^[{}]$/3: /&(#|[a-z])/i4: /^\/\//

GitHub repository:


Cloud Solution Architect | Author | Full Stack Developer | |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store