function studentController($scope) {
$scope.student = {
firstName : "Mahesh",
lastName : "Parashar",
fullName : function() {
var studentObject;
studentObject = $scope.student;
return studentObject.firstName + " " + studentObject.lastName;
}
};
}
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.min.js"></script>
<html><title>AngularJS First Application</title>
<body><h1>Sample Application</h1>
<div ng-app="" ng-controller="studentController">
<p>
Enter your Name:<input type="text" ng-model="data">
</p>
<p>
Hello <span ng-bind="data"></span>!
</p>
</div>
<br />
<table border="1px">
<tr><th>Fisrt Name</th><th>Last Name</th><th>Full Name</th></tr>
<tr><td>student.firstName</td><td>student.lastName</td><td>student.fullName</td></tr>
</table>
<script src="angular.min.js"></script>
</body>
</html>
<script>
</script>
I am new in Angular js and start to make program but ng-controller not working,When I added a ng-controller="studentController" normal angular ng-bind="data" program also not working so Please anyone help me out what's wrong in it.
Thanks
Priyanka Sankhala