See the image for the problem
angular.controller('myController', function ($scope) {
var reg = {
firstName: 'Aaa',
lastName: 'Sss',
};
$scope.reg = reg;
});
This is my control.js file
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="Script/angular.min.js"></script>
<script src="Script/ControllerOnly.js"></script>
</head>
<body>
<div ng-controller="myController">
FirstName <input type="text" ng-model="reg.firstName" />
<br />
LastName<input type="text" ng-model="reg.lastName" />
<br />
<br />
{{reg.firstName}}
<br />
{{reg.lastName}}
</div>
</body>
</html>
This is my html file.
Not getting the output and unable to decipher the error. Any help will be appreciated and thanks in advance..