Categories
AngularJS

Expressions of AngularJS

In AngularJS, To bind application data to html expressions are used. It is written inside of double braces like {{expression}}. It uses same way as ng-bind.

Following example will show all the expressions of AngularJS:

<html>
<title>My AngularJS Expressions</title>
<body>
<h1>AngularJS Expressions</h1>
<div ng-app="" ng-init="quantity=2;cost=10; colleague={firstname:'Tim',lastname:'Ererld',salary:25000};Points=[10,20,30,40,50]">
<p>Welcome {{colleague.firstname + " " + colleague.lastname}}!</p>
<p>Price(Rs) : {{quantity * cost}}</p>
<p>Salary: {{colleague.salary}}</p>
<p>Points: {{Points[3]}}</p>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
</body>
</html>
Avatar for Namaste UI (Author)

By Namaste UI (Author)

Namaste UI collaborates closely with clients to develop tailored guest posting strategies that align with their unique goals and target audiences. Their commitment to delivering high-quality, niche-specific content ensures that each guest post not only meets but exceeds the expectations of both clients and the hosting platforms. Connect with us on social media for the latest updates on guest posting trends, outreach strategies, and digital marketing tips. For any types of guest posting services, contact us on info[at]namasteui.com.

Leave a Reply

Your email address will not be published. Required fields are marked *