"todo angular"
Bootstrap 3.0.0 Snippet by evarevirus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!--
To-Do App with Local Storage, Add, Delete, && Search Functionality.
Any changes you make are saved for your return.
Click the "clear my local storage" button to clear cache && reset default list.
!-->
<html lang="en" ng-app="todo">
<body ng-controller="TodoCtrl" ng-init="init()">
<div class="container" id="wrapper">
<form name="createForm" class="form" novalidate>
<section class="row">
<div class="col-1" id="addTask">
<input class="form-control" type="text" data-ng-model="newTodo.Name" placeholder="I Need To..." required />
<button class="add" ng-click="addTodo(newTodo)" data-ng-disabled="createForm.$invalid"></button>
</div>
<div class="col-1" id="search">
<input type="text" class="form-control" data-ng-model="todoSearch.name" placeholder=" Search Tasks
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
@import url(https://fonts.googleapis.com/css?family=Play);
* {
font-size: 100%;
box-sizing: border-box;
}
html {
font-size: 100%;
height: 100%;
width: 100%;
box-sizing: border-box;
}
body {
background: #212225;
font-size: 16px;
font-family: 'Play', sans-serif;
text-shadow: 2px 2px #0d0d0d, -1px -1px #262626;
}
.container {
width: 70%;
margin: 80px auto;
}
.container [class*="col-"] {
color: #a8b2b3;
margin: 5px;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-transition: all .7s ease-in;
transition: all .7s ease-in;
}
.container .row {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
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
var App = angular.module("todo", ["LocalStorageModule"]);
App.controller("TodoCtrl", function ($scope, localStorageService) {
$scope.init = function () {
$scope.newTodo = {};
$scope.todos = [];
if (!localStorageService.get("todoList")) {
$scope.todos = [
{ Name:"Make A New Pen", isDone:true},
{ Name: "Pay Phone Bill", isDone: false },
{ Name: "Fix App", isDone: true },
{ Name: "Food Shopping", isDone: false },
{ Name: "Play with Cat", isDone: false }
];
}else{
$scope.todos = localStorageService.get("todoList");
}
};
$scope.getDate = function () {
var today = new Date();
var mm = today.getMonth() + 1;
var dd = today.getDate();
var yyyy = today.getFullYear();
var date = mm + "/" + dd + "/" + yyyy;
return date;
};
$scope.addTodo = function (todoItem) {
todoItem.isDone = false;
$scope.todos.push(todoItem);
$scope.newTodo = {};
};
$scope.deleteTodo = function (index) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: