ProgrammerGuide.Net | Step by Step Programmer Guide

AngularJS Expressions with Strings by Example | AngularJS Interview Question | AngularJS Programmer Guide and Tutorials

AngularJS expressions are written inside double braces: {{ expression }}. AngularJS strings are like JavaScript strings.

<div ng-app=“” ng-init=“firstName=’John’;lastName=’Doe'”>

<p>The name is {{ firstName + ” ” + lastName }}</p>


We can also rewrite the above code using ng-bind as below:

<div ng-app=“” ng-init=“firstName=’John’;lastName=’Doe'”>

<p>The name is <span ng-bind=“firstName + ‘ ‘ + lastName”></span></p>


Please click here for related products on Amazon!


Add comment

Want to Check Celebrities News?