<div ng-controller='manageData'> <input ng-model='d' /><Br> <span ng-bind='d'></span><br> or<br> {{d}}<br> <input type='button' ng-click='greet()' value='Greet AngularJS Student' /> </div>
var myApp = angular.module('LearnAngular1',[]) function manageData($scope) { $scope.d='Programmer Name'; $scope.greet=function () { alert('Hello '+$scope.d); } }
Body {Background:white}