Machine Problem
Write a program that uses ng-app directive that will calculate the area of the circle. Using the following formula : area = 3.14 * radius * radius
I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me at the following email address for further details. If you want to advertise on my website kindly contact me also in my email address also. Thank you.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
Program Listing
<!-- index.htm
Author : Prof. Jake Rodriguez Pomperada, MAED-IT, MIT
Date : July 26, 2021 Monday 10:43 AM
Place : Bacolod City, Negros Occidental
Websites : www.jakerpomperada.com and www.jakerpomperada.blogspot.com
Email : jakerpomperada@gmail.com
-->
<html>
<head>
<title>Calculate Area of Circle Using ng-app in AngularJS</title>
</head>
<style>
body {
font-family: "arial";
font-style: bold;
font-size: 18px;
}
</style>
<script type="text/javascript" src="angular.min.js"></script>
<body><br>
<h3>Calculate Area of Circle Using ng-app in AngularJS</h3>
<body>
<div ng-app="myApp" ng-controller="Area_Circle_Controller">
The given radius {{radius | number : 2}}. <br><br>
The area of the circle is {{area | number : 2}}
</div>
<script>
var app = angular.module("myApp", []);
app.controller("Area_Circle_Controller", function($scope) {
$scope.radius = 5.0;
$scope.area = (3.14 * $scope.radius * $scope.radius);
});
</script>
</body>
</html>
</body>
</html>
No comments:
Post a Comment