Hi I'm following some tutorials of angularjs
I'm using the angularjs version 1.3.0
here is my code
<div ng-app="" ng-controller="personController">
First Name:
<input type="text" ng-model="firstName"><br>
Last Name:
<input type="text" ng-model="lastName"><br>
<br>
Full Name: {{firstName+" " + lastName}}
</div>
<script type="text/javascript">
function personController($scope) {
$scope.firstName = "David";
$scope.lastName = "Silva";
}
</script>
And I think I have done as same as the tutorial. But it gives me following error when I check with firebug.
Error: [ng:areq] Argument 'personController' is not a function, got undefined
http://errors.angularjs.org/1.3.0/ng/areq?
p0=personController&p1=not%20a%20function%2C%20got%20undefined
How to get rid of this?