How to Create Todo List in Angular 7 ? Last Updated : 14 May, 2020 Comments Improve Suggest changes Like Article Like Report The ToDo app is used to help us to remember some important task. We just add the task and when accomplished, delete them. This to-do list uses various Bootstrap classes that make our web application not only attractive but also responsive. Approach: Create a new angular app using following command: ng new my-todo-list Move inside the app by cd and run. After that open local host and check if the app is working. cd my-todo-list ng serve Install bootstrap using the following command: npm install bootstrap Edit style.css file in the project html @import 'bootstrap/dist/css/bootstrap.css'; Open src/app folder and start editing app.component.html html <!--Division for GeeksForGeeks heading--> <div class="container-fluid"> <div class="row bg-success justify-content-center align-items-center" style="height:80px"> <div class="col-3"></div> <div class="col-6 text-light h2"> GeeksForGeeks </div> </div> <!--Division for taking input from user --> <div class="row mt-1" style="height:80px;"> <div class="col-3 d-none col-md-3 d-md-block"></div> <div class="col-12 col-md-6 bg-success d-flex justify-content-center align-items-center text-light h3"> <input [(ngModel)]="newTask" type="text" value="" class="col-7 form-control" style="width:300px;"> <div class="col-1"></div> <button (click)="addToList()" class="btn btn-light text-success"> ADD TASK </button> </div> <div class="col-3 d-none col-md-3 d-md-block"></div> </div> <!--Tasks added repeated divisions--> <div *ngFor="let x of items; let index = index;" class="row mt-1" style="height:100px;"> <div class="col-3 d-none col-md-3 d-md-block"></div> <div class="col-12 col-md-6 bg-success d-flex justify-content-center align-items-center text-light h3"> <div class="col-9 text-light h3">{{x}}</div> <input (click)="deleteTask(index)" type="button" value="Delete" class="col-2 btn btn-danger"> </div> <div class="col-3 d-none col-md-3 d-md-block"></div> </div> </div> Open app.component.ts file and write functions for adding and deleting tasks. javascript import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { /* An empty array that is responsible to add a division */ public items = []; /* A two-way binding performed which pushes text on division */ public newTask; /* When input is empty, it will not create a new division */ public addToList() { if (this.newTask == '') { } else { this.items.push(this.newTask); this.newTask = ''; } } /* This function takes to input the task, that has to be deleted*/ public deleteTask(index) { this.items.splice(index, 1); } } For working with forms that is taking input we have to import FormsModule in app.module.ts file. import { FormsModule } from '@angular/forms' Output: Comment More info A ajaychawla Follow Improve Article Tags : Web Technologies AngularJS AngularJS-Misc Explore AngularJS BasicsAngularJS Tutorial 5 min read Introduction to AngularJS 4 min read Angular CLI | Angular Project Setup 3 min read AngularJS Expressions 2 min read AngularJS Modules 3 min read AngularJS ng-model Directive 4 min read AngularJS Data Binding 4 min read AngularJS Controllers 3 min read AngularJS | Scope 2 min read AngularJS Services 4 min read AngularJS | AJAX - $http 3 min read AngularJS | Tables 2 min read AngularJS Select Boxes 2 min read AngularJS SQL 3 min read AngularJS HTML DOM 2 min read AngularJS Events 3 min read AngularJS | Forms 3 min read AngularJS Form Validation 3 min read AngularJS | API 2 min read AngularJS and W3.CSS 2 min read AngularJS Includes 3 min read AngularJS Animations 1 min read AngularJS | Application 3 min read AngularJS DirectivesAngularJS Directives 9 min read AngularJS ng-app Directive 1 min read AngularJS ng-bind Directive 2 min read AngularJS ng-bind-html Directive 2 min read AngularJS ng-bind-template Directive 2 min read AngularJS ng-blur Directive 1 min read AngularJS ng-change Directive 2 min read AngularJS ng-checked Directive 2 min read AngularJS ng-class Directive 2 min read AngularJS ng-class-even Directive 2 min read AngularJS ng-class-odd Directive 2 min read AngularJS ng-click Directive 2 min read AngularJS ng-cloak Directive 2 min read AngularJS ng-controller Directive 2 min read AngularJS Directives Complete Reference 2 min read AngularJS FiltersAngularJS | Filters 7 min read AngularJS currency Filter 2 min read AngularJS | date Filter 2 min read AngularJS filter Filter 3 min read AngularJS json Filter 2 min read AngularJS limitTo Filter 2 min read AngularJS lowercase Filter 1 min read AngularJS number Filter 1 min read AngularJS orderBy Filter 4 min read AngularJs uppercase Filter 1 min read AngularJS Converting FunctionsAngularJS angular.lowercase() Function 2 min read AngularJS angular.uppercase() Function 1 min read AngularJS angular.forEach() Function 1 min read AngularJS Comparing FunctionsAngularJS angular.isArray() Function 2 min read AngularJS angular.isDate() Function 2 min read AngularJS angular.isDefined() Function 2 min read AngularJS angular.isElement() Function 2 min read AngularJS angular.isFunction() Function 2 min read AngularJS angular.isNumber() Function 2 min read AngularJS angular.isObject() Function 2 min read AngularJS | angular.isString() Function 1 min read AngularJS angular.isUndefined() Function 2 min read AngularJS angular.equals() Function 2 min read AngularJS angular.toJson() Function 2 min read AngularJS QuestionsHow to bundle an Angular app for production? 4 min read How to add many functions in one ng-click directive? 2 min read How to directly update a field by using ng-click in AngularJS ? 3 min read How to Add Dynamic Options for Multiple Selects Inside ng-repeat Directive ? 3 min read How to detect when an @Input() value changes in Angular? 3 min read How to open popup using Angular and Bootstrap ? 2 min read How to reload or re-render the entire page using AngularJS? 2 min read How to add input fields dynamically on button click in AngularJS ? 2 min read How to Create Button Dynamically with Click Event in Angular ? 2 min read How to use jQuery in Angular ? 2 min read AngularJS Examples 2 min read Like