Vote count: 0
I had the following code in angular.
<html>
<head>
<title>AngularJS</title>
</head>
<body>
<div ng-app="" ng-controller="studentController">
<p>Enter your first name <input type="text" ng-model="student.firstName"><br>
<p>Enter your last name <input type="text" ng-model="student.lastName"><br>
<br>
You are entering: {{student.fullName()}}
</div>
<script>
function studentController($scope) {
$scope.student = {
firstName: "",
lastName: "",
fullName: function() {
var studentObject;
studentObject = $scope.student;
return studentObject.firstName + " " + studentObject.lastName;
}
};
}
</script>
<script src="http://ift.tt/1AFpghH"></script>
</body>
</html>
However, the webpage rendered produced two input boxes and the text {{student.fullName()}}. On replacing the CDN address from 1.3.5 to 1.2.15 solves the problem and produces the desired output. Is the above code( or a part) obsolete ?
asked 2 mins ago
This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
Difference in Angulad CND version creating unwanted result
Aucun commentaire:
Enregistrer un commentaire