AngularJS Expressions

AngularJS expressions are written inside double braces: {{ expression }}. AngularJS will "output" data exactly where the expression is written.

Sample Code:

<!DOCTYPE html>
<html>
<script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<body>
<div ng-app="">
<p>Input something in the input box to view it below:</p>
<p>Name: <input type="text" ng-model="name"></p>
<p>{{name}}</p>
</div>
</body>
</html>

Output:


Cheers!!!

No comments:

Post a Comment