<div ng-app = "App1" ng-controller = "studentController">
Enter first name: <input type = "text" ng-model = "student.firstName"><br><br>
Enter last name: <input type = "text" ng-model = "student.lastName"><br>
<br>
Hi {{student.fullName()}}!
</div>
<script>
var App1 = angular.module("App1", []);
App1.controller('studentController', function($scope) {
$scope.student = {
firstName: "",
lastName: "",
fullName: function() {
var studentFullName;
studentFullName = $scope.student;
return " " + studentFullName.firstName + " " + studentFullName.lastName;
}
};
});
</script>