javascript - AngularJS Controllers not showing the result -


when user enter texts on textbox {{student.fullname()}} should updated. not working. help?

sample applications

<div ng-app = "mainapp" 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/>      entering: {{student.fullname()}} </div> <script>     var mainapp = angular.module("mainapp", []);      mainapp.controller('studentcontroller', function($scope){         $scope.student = {             firstname: "mahesh",             lastname: "parashar",              fullname: function() {                 var studentobject;                 studentobject = $scope.student;                 return studentobject.firstname+ " " + studentobject.lastname;             }         };     }); </script> 

screenshot of result:

enter image description here

use lowercase c controller

 mainapp.controller('studentcontroller', function($scope){ 

http://jsbin.com/besini/1/edit?html,css,console,output


Comments