Please help to identify, what is wrong in below angular Hello World! first program.
<html>
<head>
<script type="text/javascript" language="javascript" src="Scripts/angular.js" />
<script type="text/javascript" language="javascript" src="Scripts/angular-resource.js" />
<script type="text/javascript" language="javascript" src="Scripts/angular-route.js" />
<script type="text/javascript" language="javascript" src="Scripts/angular-cookies.js" />
<script type="text/javascript" language="javascript" src="Scripts/angular-sanitize.js" />
<script type="text/javascript" language="javascript">
funtion Student($scope){
$scope.Name= 'Akshay';
$scope.City: 'Mumbai';
};
var app = angular.module("myApp");
app.controller("Student", Student)
</script>
</head>
<body ng-app="myApp">
<form>
<div id="dvStudent" ng-controller="Student">
Name: <input type="text" name="txtStudentName" id="txtStudentName" ng-model="Name" />
City: <input type="text" name="txtStudentCity" id="txtStudentCity" ng-model="City" />
<input type="button" name="btnSave" id="btnStudentSave" value="Save" /> <input type="reset" name="btnReset" id="btnStudentReset" value="Reset" />
<br />
You have inputed Name: {{Name}} & City: {{City}}
</div>
</form>
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire