⊗jsagPmTpItp 13 of 97 menu

Interpolation in Angular

In a template file, you can not only display text, but also write JavaScript code, performing various operations. In Angular terms, this is called interpolation.

To perform an operation, it must be written in double curly brackets. For example, let's find the sum of two numbers:

<div> {{ 1 + 2 }} </div>

Now let's find the square root of the number:

<div> {{ Math.sqrt(2) }} </div>

Use interpolation to output the product of two numbers.

Use interpolation to round a fraction to a given sign in the fractional part.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline