0 votes
in Angular by
What are Expressions in Angular?

1 Answer

0 votes
by

Angular expressions are unit of code which resolves to value. This code is written inside curly braces {.

Below are some examples of Angular expressions:

The below expression adds two constant values.

JavaScript
{{1+1}}

The below expression multiplies quantity and cost to get the total value.

The value total cost is {{ quantity * cost }}

The below expression displays a controller scoped variable.

HTML
<div ng-controller="CustomerVM">
The value of Customer code is {{CustomerCode}}
</div>
The value of Customer code is {{CustomerCode}}.
...