Edit This Code:
See Result »
<!DOCTYPE html> <html lang="en"> <script src="http://ajax.googleapis.bootcss.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> <body> <div ng-app="myApp" ng-controller="formCtrl"> <form> First Name: <input type="text" ng-model="firstname"> </form> </div> <script> var app = angular.module('myApp', []); app.controller('formCtrl', function($scope) { $scope.firstname = "John"; }); </script> </body> </html>
Result: