Pay attention to the angular ng directives specifying ng-app, ng-controller and ng-model. Also, notice the angular template (data binding) to display the data.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="format-detection" content="telephone=no" />
<meta name="viewport"
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
<link rel="stylesheet" type="text/css" href="css/index.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<meta name="msapplication-tap-highlight" content="no" />
<title>Hello World</title>
</head>
<body>
<div ng-app="HelloApp" ng-controller="HelloCtrl">
<form role="form" method="post" action="#">
<div class="form-group form-group-lg">
<label class="col-xs-2 control-label">Name</label>
<div class="col-xs-12">
<input type="text" class="form-control input-lg" name="name" ng-model="name" />
</div>
</div>
<div class="col-xs-10">
<h3>Hello {{name}}!</h3>
</div>
</form>
</div>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript">
app.initialize();
</script>
<script>
var helloApp = angular.module("HelloApp", []);
helloApp.controller("HelloCtrl", [ '$scope', function($scope) {
$scope.name = "Calvin Hobbes";
} ]);
</script>
</body>
</html>
…
[adsenseyu1]
In recent years, artificial intelligence (AI) has evolved to include more sophisticated and capable agents,…
Adaptive learning helps in tailoring learning experiences to fit the unique needs of each student.…
With the increasing demand for more powerful machine learning (ML) systems that can handle diverse…
Anxiety is a common mental health condition that affects millions of people around the world.…
In machine learning, confounder features or variables can significantly affect the accuracy and validity of…
Last updated: 26 Sept, 2024 Credit card fraud detection is a major concern for credit…