Execute
<!DOCTYPE html> <html> <head> <title>AngularJS Expressions with example</title> </head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"></script> <body> <div ng-app="" ng-init="color='pink'; exp={firstword:'wiki', lastword:'techy'}; arr=[1,2,3,4,5]"> <h3>Expressions Using Numbers:</h3> <p>The Addition of two numbers:{{ 100 + 50 }}</p> <h3>AngularJS Expression using the css property</h3> <input style="background-color:{{color}}" ng-model="color" value="{{color}}"> <h3>AngularJS Expression using String</h3> <p>The name is <span ng-bind="exp.firstword +''+ exp.lastword"></span></p> <h3>AngularJs Expression using Objects</h3> <p>The firstword is {{ exp.firstword }}</p> <h3>AngularJs Expression using array</h3> <p>The array value is {{ arr[3] }}</p> </div> </body> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.