-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
128 lines (107 loc) · 4.46 KB
/
index.html
File metadata and controls
128 lines (107 loc) · 4.46 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html lang="en" ng-app="todo" ng-controller="control">
<head>
<meta charset="UTF-8">
<title>SmartUpCode Todo App</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.0/angular-animate.js"></script>
<script>
var app = angular.module("todo",['ngAnimate']);
app.controller("control", function ($scope) {
$scope.buton=true;
$scope.listeler=[{'gorev':'angular js uygulmasi yap','sonuc':false},
{'gorev':'angular js uygulmasi yapma','sonuc':true}];
$scope.ekle=function () {
$scope.listeler.push({'gorev':$scope.todo, 'sonuc':false});
$scope.todo="";
}
$scope.sil=function (a) {
$scope.listeler.splice(a,1);
}
});
</script>
<style>
li{
font-size: 15px;
}
.sonuc{
text-decoration: line-through;
color: red;
}
.ng-enter{
transition: all 1s;
margin-left: 100px;
}
.ng-enter-active{
margin-left: 0px;
}
.ng-leave{
transition: all 1s;
margin-left: 10px;
}
.ng-leave-active{
margin-left: 100px;
}
#container{
margin: auto;
height: auto;
width: 600px;
}
</style>
</head>
<body ng-init="$scope.page=1">
<div id="container">
<div class="bg-primary">
<h2> <center>SmartUpCode Todo uygulamasi</center></h2>
</div>
<div class="input-group">
<input type="text" ng-model="todo" class="form-control" placeholder="Eklemek istediginiz gorevi giriniz" ng-keyup="buton=false"> <!-- $event.keyCode==13 ? ekle():null &&-->
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="ekle()" ng-disabled="buton || todo.length==0">Ekle</button>
</span>
</div>
<div class="input-group">
<input type="text" ng-model="arama" class="form-control" placeholder="Aramak istediginiz gorevi giriniz" ng-keyup="buton=false"> <!-- $event.keyCode==13 ? ekle():null &&-->
<span class="input-group-btn">
<button class="btn btn-default" type="button" ng-click="ara()" ng-disabled="buton || todo.length==0">Ara</button>
</span>
</div>
</div>
<div id="container">
<ul class="nav nav-pills">
<li role="presentation" ng-click="$scope.page=1"><a href="#">Butun Gorevler</a></li>
<li role="presentation" ng-click="$scope.page=2"><a href="#">Bitmis Gorevler</a></li>
<li role="presentation" ng-click="$scope.page=3"><a href="#">Bitmemis gorevler</a></li>
</ul>
</div>
<div ng-show="$scope.page==1" class="jumbotron" id="container">
<div class="alert alert-info" role="alert"> <center> <h4>Butun gorevler</h4></center></div>
<ul class="list-group">
<li class="list-group-item" ng-repeat="liste in listeler | filter:arama">
<input type="checkbox" ng-model="liste.sonuc">
<span ng-class="{'sonuc':liste.sonuc}">{{liste.gorev}}
<button ng-click="sil($index)">sil</button></li>
</ul>
</div>
<div ng-show="$scope.page==2" class="jumbotron" id="container">
<div class="alert alert-success" role="alert"><center><h4>Bitmis gorevler</h4></center></div>
<ul class="list-group">
<li class="list-group-item" ng-repeat="liste in listeler | filter:{sonuc:true}">
<input type="checkbox" ng-model="liste.sonuc">
<span ng-class="{'sonuc':liste.sonuc}">{{liste.gorev}}
<button ng-click="sil($index)">sil</button></li>
</ul>
</div>
<div ng-show="$scope.page==3" class="jumbotron" id="container">
<div class="alert alert-danger" role="alert"><center><h4>Bitmemis gorevler</h4></center></div>
<ul class="list-group">
<li class="list-group-item" ng-repeat="liste in listeler | filter:{sonuc:false}">
<input type="checkbox" ng-model="liste.sonuc">
<span ng-class="{'sonuc':liste.sonuc}">{{liste.gorev}}
<button ng-click="sil($index)">sil</button></li>
</ul>
</div>
</div>
</body>
</html>