In AngularJs
while we use any expression we write them in double curly braces “{{ }}” so this double curly braces is
also known as interpolation directive.
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>AngularJS Plunker</title> <link rel="stylesheet" href="style.css" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.7/angular.min.js" data-semver="1.4.7"></script> <script> var app = angular.module('helloApp', []); app.controller('HelloCtrl', ["$scope", function($scope) { $scope.name = 'Avanish'; $scope.students = [{ Id: 1, Name: 'Anil' }, { Id: 2, Name: 'Avanish' }, { Id: 3, Name: 'Alok' }] }]); </script> </head> <body ng-app="helloApp" ng-controller="HelloCtrl"> <p>Hello {{name}}</p> </body> </html>
The Output as below,
Blogger Comment
Facebook Comment