What is interpolation in angular ?

Templates always need text or string to be dynamic at runtime. So angular given us

Interpolation technique to title, username, error messages etc

We put inside {{text }} double curly braces

Class file

userName = “Anil”

Template

Welcome, {{userName}}

Some time we need maths expression

Conditions

Real Count Wins {{ total + 56 == 200 ? “Winner”: “Loser”}}

Can’t use javascript expression

+= , new , instanceof , typeof , ;

Angular runs template expressions after every change detection cycle runs.

--

--

Software Engineer | Bharat Swabhiman Patanjali Social Activist | Speaker | Motivator | Yoga Trainer

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
ACHARYA ANIL SURYAVANSHI

Software Engineer | Bharat Swabhiman Patanjali Social Activist | Speaker | Motivator | Yoga Trainer