Learn Angular: Build a Todo App

Book description

Angular is not just a framework, but rather a platform that empowers developers to build applications for the web, mobile, and the desktop.

This book contains a complete tutorial on building a todo app with Angular. Along the way, we'll learn about installation and setup, component architecture, adding a REST backend, routing, authentication, and much more.

This book is for all front-end developers who want to become proficient with Angular and its related tools. You'll need to be familiar with HTML and CSS and have a reasonable level of understanding of JavaScript in order to follow the discussion.

Publisher resources

View/Submit Errata

Table of contents

  1. Build a Todo App with Angular
  2. Notice of Rights
  3. Notice of Liability
  4. Trademark Notice
  5. About SitePoint
  6. Preface
    1. Who Should Read This Book?
    2. Conventions Used
      1. Code Samples
      2. Tips, Notes, and Warnings
  7. Chapter 1: Getting the First Version of the App Up and Running
    1. Initialize Your Todo Application Using Angular CLI
    2. Creating the Todo Class
    3. Creating the TodoDataService Service
    4. Editing the AppComponent Component
    5. Deploying to GitHub Pages
    6. Summary
  8. Chapter 2: Understanding Component Architecture
    1. A Quick Recap
    2. Up and Running
    3. The Original AppComponent
    4. A More Modular Component Architecture — Creating the TodoListHeaderComponent
      1. Smart vs Dumb Components
    5. Creating the TodoListComponent
    6. Creating the TodoListItemComponent
    7. Creating the TodoListFooterComponent
    8. Moving the TodoDataService Provider
    9. Summary
  9. Chapter 3: Angular and RxJS: Adding a REST API Back End
    1. by Maria Antonietta Perna
    2. A Quick Recap
    3. Up and Running
    4. Setting up a REST API back end
    5. Storing the API URL
    6. Creating the Service to Communicate with the REST API Back End
    7. The Angular HTTP Service
    8. Implementing the ApiService Methods
      1. getAllTodos()
      2. getTodoById()
      3. createTodo()
      4. updateTodo()
      5. deleteTodoById()
    9. Updating TodoDataService
    10. Updating AppComponent
    11. Trying it Out
    12. Running our Tests
    13. Fixing Our Unit Tests
    14. Creating an ApiMockService
    15. Summary
  10. Chapter 4: An Introduction to Component Routing with Angular Router
    1. Why routing?
      1. What is a JavaScript router?
      2. What is Angular Router?
    2. How Angular Router Works
    3. Enabling Routing
      1. Creating the routing configuration
      2. Importing the routing configuration
      3. Adding a router outlet
      4. Adding a wildcard route
    4. Resolving Data using Angular Router
      1. Creating TodosResolver
      2. Resolving todos via the router
      3. Using resolved data
    5. Summary
  11. Chapter 5: Authentication: Protecting Private Content
    1. Authentication Strategy
    2. Setting Up the Backend
    3. Adding Authentication Logic to our API Service
    4. Creating a Session Service
    5. Creating an Authentication Service
    6. Creating a Sign-in Page
    7. Protecting Our Application’s Private Area From Unauthorized Access
    8. Sending The User’s Token With API Requests
    9. Adding a Sign-out Button to Our TodosComponent
    10. Summary
  12. Chapter 6: How to Update Angular Projects to the Latest Version
    1. The Meaning of Angular Versions
    2. The Angular Update Guide
    3. Before Updating
    4. During the Update
    5. After the Update
    6. Switching from HttpModule to HttpClientModule
    7. Using the RxJS Pipe Operator
    8. Summary

Product information

  • Title: Learn Angular: Build a Todo App
  • Author(s): Jurgen van de Moere
  • Release date: June 2018
  • Publisher(s): SitePoint
  • ISBN: 9780648331575