-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRounding.html
39 lines (30 loc) · 1.04 KB
/
Rounding.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>rounding systems</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<script src="script.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
</head>
<body>
<h2>Pyöristymis homma </h2>
<p><b> 3.14159 26535 89793...</b> pälä pälä niin jatkuu</p>
<div ng-app="FilteriEsim">
<script>
angular.module('FilteriEsim', [])
.controller('ControlliEsim', ['$scope', function($scope)
{
$scope.val = ''; //user input
}]);
</script>
<div ng-controller="ControlliEsim">
<label>Enter the number here: <input ng-model='val'></label><br>
Oletus pyöristyminen: <span id='number-default'>{{val | number}}</span><br><br>
Ei pyöristämistä: <span>{{val | number:0}}</span><br><br>
Negatiivinen numero: <span>{{-val | number:4}}</span><br><br>
Uusi numero: <span>{{-val | number:8}}</span>
</div>
</body>
</html>