O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Angular 5 (formerly Angular 2) - The Complete Guide

Video Description

Master Angular (Angular 2+, incl. Angular 5) and build awesome, reactive web apps with the successor of Angular.js

About This Video

  • Which architecture Angular uses
  • How to use TypeScript to write Angular applications
  • All about directives and components, including the creation of custom directives/ components
  • How databinding works
  • All about routing and handling navigation
  • What pipes are and how to use them
  • How to access the Web (e.g. RESTful servers)
  • What dependency injection is and how to use it
  • How to use modules in Angular
  • How to optimize your (bigger) Angular application
  • We will build a major project in this course

In Detail

This course starts from scratch, you neither need to know Angular 1 nor Angular 2! Angular 5 is simply the latest version of Angular 2. Join the most comprehensive and popular Angular course, because now is the time to get started! From Setup to Deployment, this course covers it all! You'll learn all about Components, Directives, Services, Forms, Http Access, Authentication, Optimizing an Angular App with Modules and Offline Compilation and much more - and in the end: you'll learn how to deploy an application! But that's not all! This course will also show you how to use the Angular CLI and features a complete project, which allows you to practice the things learned throughout the course! Angular is one of the most modern, performance-efficient and powerful frontend frameworks you can learn as of today. It allows you to build great web apps which offer awesome user experiences! Learn all the fundamentals you need to know to get started developing Angular applications right away. TypeScript is the main language used by the official Angular team and the language you'll mostly see in Angular tutorials. It's a superset to JavaScript and makes writing Angular apps really easy. Using it ensures, that you will have the best possible preparation for creating Angular apps. Check out the free videos for more information.

Table of Contents

  1. Chapter 1 : Getting Started
    1. Course Introduction 00:00:58
    2. What is Angular? 00:02:00
    3. Angular vs Angular 2 vs Angular 4 00:01:32
    4. Project Setup and First App 00:05:13
    5. Editing the First App 00:09:04
    6. The Course Structure 00:04:00
    7. How to get the Most out of the Course 00:02:26
    8. What is TypeScript? 00:02:10
    9. A Basic Project Setup using Bootstrap for Styling 00:03:35
  2. Chapter 2 : The Basics
    1. Module Introduction 00:00:57
    2. How an Angular App gets Loaded and Started 00:07:11
    3. Components are Important! 00:03:09
    4. Creating a New Component 00:06:52
    5. Understanding the Role of AppModule and Component Declaration 00:05:16
    6. Using Custom Components 00:01:12
    7. Creating Components with the CLI & Nesting Components 00:03:51
    8. Working with Component Templates 00:03:09
    9. Working with Component Styles 00:04:02
    10. Fully Understanding the Component Selector 00:03:50
    11. What is Databinding? 00:02:50
    12. String Interpolation 00:05:19
    13. Property Binding 00:06:34
    14. Property Binding vs String Interpolation 00:03:08
    15. Event Binding 00:04:09
    16. Passing and Using Data with Event Binding 00:04:37
    17. Two-Way-Databinding 00:02:48
    18. Combining all Forms of Databinding 00:01:47
    19. Understanding Directives 00:02:17
    20. Using ngIf to Output Data Conditionally 00:03:53
    21. Enhancing ngIf with an Else Condition 00:02:46
    22. Styling Elements Dynamically with ngStyle 00:05:02
    23. Applying CSS Classes Dynamically with ngClass 00:02:54
    24. Outputting Lists with ngFor 00:03:44
    25. Getting the Index when using ngFor 00:02:53
  3. Chapter 3 : Course Project - The Basics
    1. Project Introduction 00:01:05
    2. Planning the App 00:05:34
    3. Setting up the Application 00:04:32
    4. Creating the Components 00:09:33
    5. Using the Components 00:03:16
    6. Adding a Navigation Bar 00:05:10
    7. Creating a "Recipe" Model 00:04:33
    8. Adding Content to the Recipes Components 00:07:42
    9. Outputting a List of Recipes with ngFor 00:04:38
    10. Displaying Recipe Details 00:05:53
    11. Working on the ShoppingListComponent 00:01:50
    12. Creating an "Ingredient" Model 00:02:36
    13. Creating and Outputting the Shopping List 00:02:27
    14. Adding a Shopping List Edit Section 00:03:28
    15. Wrap Up & Next Steps 00:00:54
  4. Chapter 4 : Debugging
    1. Understanding Angular Error Messages 00:04:36
    2. Debugging Code in the Browser Using Sourcemaps 00:05:32
    3. Using Augury to Dive into Angular Apps 00:02:01
  5. Chapter 5 : Components & Databinding Deep Dive
    1. Module Introduction 00:00:37
    2. Splitting Apps into Components 00:05:56
    3. Property & Event Binding Overview 00:01:44
    4. Binding to Custom Properties 00:05:44
    5. Assigning an Alias to Custom Properties 00:02:00
    6. Binding to Custom Events 00:09:06
    7. Assigning an Alias to Custom Events 00:00:57
    8. Custom Property and Event Binding Summary 00:02:02
    9. Understanding View Encapsulation 00:05:00
    10. More on View Encapsulation 00:02:43
    11. Using Local References in Templates 00:04:36
    12. Getting Access to the Template & DOM with @ViewChild 00:05:02
    13. Projecting Content into Components with ng-content 00:03:22
    14. Understanding the Component Lifecycle 00:04:54
    15. Seeing Lifecycle Hooks in Action 00:11:55
    16. Lifecycle Hooks and Template Access 00:02:33
    17. Getting Access to ng-content with @ContentChild 00:03:01
    18. Wrap Up 00:00:50
  6. Chapter 6 : Course Project - Components & Databinding
    1. Introduction 00:00:50
    2. Adding Navigation with Event Binding and ngIf 00:07:32
    3. Passing Recipe Data with Property Binding 00:04:44
    4. Passing Data with Event and Property Binding (Combined) 00:10:32
    5. Allowing the User to Add Ingredients to the Shopping List 00:07:23
  7. Chapter 7 : Directives Deep Dive
    1. Module Introduction 00:01:23
    2. ngFor and ngIf Recap 00:03:36
    3. ngClass and ngStyle Recap 00:02:57
    4. Creating a Basic Attribute Directive 00:06:56
    5. Using the Renderer to build a Better Attribute Directive 00:07:05
    6. Using HostListener to Listen to Host Events 00:03:00
    7. Using HostBinding to Bind to Host Properties 00:03:17
    8. Binding to Directive Properties 00:06:44
    9. What Happens behind the Scenes on Structural Directives? 00:03:05
    10. Building a Structural Directive 00:06:14
    11. Understanding ngSwitch 00:02:49
  8. Chapter 8 : Course Project – Directives
    1. Building and Using a Dropdown Directive 00:06:26
  9. Chapter 9 : Using Services & Dependency Injection
    1. Module Introduction 00:01:40
    2. Why would you Need Services? 00:02:04
    3. Creating a Logging Service 00:03:33
    4. Injecting the Logging Service into Components 00:06:22
    5. Creating a Data Service 00:06:41
    6. Understanding the Hierarchical Injector 00:02:41
    7. How many Instances of Service Should It Be? 00:02:13
    8. Injecting Services into Services 00:04:24
    9. Using Services for Cross-Component Communication 00:04:07
  10. Chapter 10 : Course Project - Services & Dependency Injection
    1. Introduction 00:01:24
    2. Setting up the Services 00:01:15
    3. Managing Recipes in a Recipe Service 00:04:08
    4. Using a Service for Cross-Component Communication 00:05:07
    5. Adding the Shopping List Service 00:05:04
    6. Using Services for "Push Notifications" 00:03:09
    7. Adding Ingredients to Recipes 00:03:42
    8. Passing Ingredients from Recipes to the Shopping List (via a Service) 00:07:04
  11. Chapter 11 : Changing Pages with Routing
    1. Module Introduction 00:01:27
    2. Why do we need a Router? 00:01:16
    3. Setting up and Loading Routes 00:08:02
    4. Navigating with Router Links 00:05:18
    5. Understanding Navigation Paths 00:04:54
    6. Styling Active Router Links 00:05:02
    7. Navigating Programmatically 00:03:28
    8. Using Relative Paths in Programmatic Navigation 00:05:10
    9. Passing Parameters to Routes 00:03:11
    10. Fetching Route Parameters 00:04:02
    11. Fetching Route Parameters Reactively 00:07:26
    12. An Important Note about Route Observables 00:02:43
    13. Passing Query Parameters and Fragments 00:05:53
    14. Retrieving Query Parameters and Fragments 00:03:16
    15. Practicing and some Common Gotchas 00:06:08
    16. Setting up Child (Nested) Routes 00:04:28
    17. Using Query Parameters – Practice 00:05:37
    18. Configuring the Handling of Query Parameters 00:01:50
    19. Redirecting and Wildcard Routes 00:04:36
    20. Outsourcing the Route Configuration 00:04:40
    21. An Introduction to Guards 00:01:46
    22. Protecting Routes with canActivate 00:08:55
    23. Protecting Child (Nested) Routes with canActivateChild 00:02:52
    24. Using a Fake Auth Service 00:01:43
    25. Controlling Navigation with canDeactivate 00:12:28
    26. Passing Static Data to a Route 00:05:56
    27. Resolving Dynamic Data with the resolve Guard 00:09:54
    28. Understanding Location Strategies 00:04:44
    29. Wrap Up 00:00:51
  12. Chapter 12 : Course Project – Routing
    1. Planning the General Structure 00:01:36
    2. Setting up Routes 00:07:58
    3. Adding Navigation to the App 00:01:42
    4. Marking Active Routes 00:01:31
    5. Fixing Page Reload Issues 00:02:51
    6. Child Routes: Challenge 00:01:54
    7. Adding Child Routing Together 00:04:22
    8. Configuring Route Parameters 00:06:22
    9. Passing Dynamic Parameters to Links 00:03:01
    10. Styling Active Recipe Items 00:01:15
    11. Adding Editing Routes 00:03:44
    12. Retrieving Route Parameters 00:03:19
    13. Programmatic Navigation to the Edit Page 00:04:47
    14. One Note about Route Observables 00:00:52
  13. Chapter 13 : Understanding Observables
    1. Module Introduction 00:04:26
    2. Analysing a Built-in Angular Observable 00:04:11
    3. Building & Using a First Simple Observable 00:03:10
    4. Building & Using a Custom Observable from Scratch 00:06:30
    5. Unsubscribe! 00:03:33
    6. Where to learn more 00:01:32
    7. Using Subjects to Pass AND Listen to Data 00:06:23
    8. Understanding Observable Operators 00:02:32
    9. Wrap Up 00:01:22
  14. Chapter 14 : Handling Forms in Angular Apps
    1. Improving the Reactive Service with Observables (Subjects) 00:03:52
  15. Chapter 15 : Course Project – Forms
    1. Module Introduction 00:01:19
    2. Why do we Need Angular's Help? 00:02:22
    3. Template-Driven (TD) vs Reactive Approach 00:01:16
    4. An Example Form 00:01:33
    5. TD: Creating the Form and Registering the Controls 00:05:43
    6. TD: Submitting and Using the Form 00:06:16
    7. TD: Understanding Form State 00:02:29
    8. TD: Accessing the Form with @ViewChild 00:03:04
    9. TD: Adding Validation to check User Input 00:04:14
    10. TD: Using the Form State 00:04:27
    11. TD: Outputting Validation Error Messages 00:02:24
    12. TD: Set Default Values with ngModel Property Binding 00:02:16
    13. TD: Using ngModel with Two-Way-Binding 00:02:49
    14. TD: Grouping Form Controls 00:03:30
    15. TD: Handling Radio Buttons 00:03:27
    16. TD: Setting and Patching Form Values 00:04:42
    17. TD: Using Form Data 00:04:44
    18. TD: Resetting Forms 00:01:48
    19. Introduction to the Reactive Approach 00:00:40
    20. Reactive: Setup 00:02:26
    21. Reactive: Creating a Form in Code 00:04:07
    22. Reactive: Syncing HTML and Form 00:03:58
    23. Reactive: Submitting the Form 00:02:16
    24. Reactive: Adding Validation 00:02:51
    25. Reactive: Getting Access to Controls 00:03:47
    26. Reactive: Grouping Controls 00:03:47
    27. Reactive: Arrays of Form Controls (FormArray) 00:07:31
    28. Reactive: Creating Custom Validators 00:06:11
    29. Reactive: Using Error Codes 00:03:20
    30. Reactive: Creating a Custom Async Validator 00:04:38
    31. Reactive: Reacting to Status or Value Changes 00:02:11
    32. Reactive: Setting and Patching Values 00:02:10
  16. Chapter 16 : Course Project – Forms
    1. Introduction 00:01:00
    2. TD: Adding the Shopping List Form 00:03:43
    3. Adding Validation to the Form 00:02:22
    4. Allowing the Selection of Items in the List 00:04:25
    5. Loading the Shopping List Items into the Form 00:03:02
    6. Updating existing Items 00:03:16
    7. Resetting the Form 00:02:35
    8. Allowing the the User to Clear (Cancel) the Form 00:01:17
    9. Allowing the Deletion of Shopping List Items 00:02:53
    10. Creating the Template for the (Reactive) Recipe Edit Form 00:05:00
    11. Creating the Form for Editing Recipes 00:05:06
    12. Syncing HTML with the Form 00:03:52
    13. Adding Ingredient Controls to a Form Array 00:05:39
    14. Adding new Ingredient Controls 00:03:39
    15. Validating User Input 00:05:10
    16. Submitting the Recipe Edit Form 00:07:31
    17. Adding a Delete and Clear (Cancel) Functionality 00:04:47
    18. Redirecting the User (after Deleting a Recipe) 00:01:47
    19. Adding an Image Preview 00:01:48
    20. Providing the Recipe Service Correctly 00:01:59
    21. Deleting Ingredients and Some Finishing Touches 00:03:35
  17. Chapter 17 : Using Pipes to Transform Output
    1. Introduction & Why Pipes are Useful 00:02:02
    2. Using Pipes 00:03:28
    3. Parametrizing Pipes 00:02:11
    4. Where to learn more about Pipes 00:01:57
    5. Chaining Multiple Pipes 00:02:20
    6. Creating a Custom Pipe 00:06:42
    7. Parametrizing a Custom Pipe 00:02:36
    8. Example: Creating a Filter Pipe 00:07:02
    9. Pure and Impure Pipes (or: How to "fix" the Filter Pipe) 00:04:46
    10. Understanding the "async" Pipe 00:04:04
  18. Chapter 18 : Making Http Requests
    1. Introduction & How Http Requests Work in SPAs 00:01:59
    2. Example App & Backend Setup 00:03:08
    3. Sending Requests (Example: POST Request) 00:09:11
    4. Adjusting Request Headers 00:02:38
    5. Sending GET Requests 00:05:42
    6. Sending a PUT Request 00:01:43
    7. Transform Responses Easily with Observable Operators (map()) 00:03:30
    8. Using the Returned Data 00:02:30
    9. Catching Http Errors 00:03:41
    10. Using the "async" Pipe with Http Requests 00:04:05
  19. Chapter 19 : Course Project – Http
    1. Introduction 00:01:21
    2. Setting up Firebase as a Dummy Backend 00:02:54
    3. Sending PUT Requests to Save Data 00:08:11
    4. GETting Back the Recipes 00:04:22
    5. Transforming Response Data to Prevent Errors 00:04:36
  20. Chapter 20 : Authentication & Route Protection in Angular Apps
    1. Module Introduction 00:00:58
    2. How Authentication Works in Single-Page-Applications 00:05:01
    3. Creating a Signup Page and Route 00:06:32
    4. Setting up the Firebase SDK 00:04:05
    5. Signing Users Up 00:03:23
    6. Signin Users In 00:05:03
    7. Requiring a Token (on the Backend) 00:02:32
    8. Sending the Token 00:06:09
    9. Checking and Using Authentication Status 00:02:39
    10. Adding a Logout Button 00:02:10
    11. Route Protection and Redirection Example 00:04:14
    12. Wrap Up 00:00:57
  21. Chapter 21 : Using Angular Modules & Optimizing Apps
    1. Module Introduction 00:01:03
    2. The Idea behind Modules 00:01:41
    3. Understanding the App Module 00:05:47
    4. Understanding Feature Modules 00:02:06
    5. Creating a Recipe Feature Module 00:09:55
    6. Registering Routes in a Feature Module 00:04:47
    7. Understanding Shared Modules 00:00:58
    8. Creating a Shared Module 00:05:07
    9. Creating a Shopping List Feature Module 00:04:09
    10. Loading Components via Selectors vs Routing 00:03:19
    11. A Common Gotcha 00:01:36
    12. Creating the Auth Feature Module 00:04:35
    13. Understanding Lazy Loading 00:01:56
    14. Adding Lazy Loading to the Recipes Module 00:08:20
    15. How Modules and Services Work Together 00:05:47
    16. Understanding the Core Module 00:00:53
    17. Creating a Basic Core Module 00:05:37
    18. Restructuring Services to use the Child Injector 00:04:32
    19. Using Ahead-of-Time Compilation 00:05:38
    20. How to use AoT Compilation with the CLI 00:03:18
    21. Preloading Lazy Loaded Routes 00:04:11
    22. Wrap Up 00:00:31
  22. Chapter 22 : Deploying an Angular App
    1. Module Introduction 00:00:41
    2. Deployment Preparations and Important Steps 00:04:06
    3. Example: Deploying to AWS S3 00:06:36
  23. Chapter 23 : Bonus: The HttpClient
    1. Module Introduction 00:00:56
    2. The Documentation 00:01:49
    3. Unlocking 00:06:36
    4. Request Configuration and Response 00:06:09
    5. Requesting Events 00:04:53
    6. Settings Headers 00:03:11
    7. Http Parameters 00:02:51
    8. Progress 00:05:45
    9. Interceptors 00:08:56
    10. Modifying Requests in Interceptors 00:04:50
    11. Multiple Interceptors 00:04:58
    12. Wrap Up 00:00:36
  24. Chapter 24 : Bonus: Working with NgRx in our Project
    1. Module Introduction 00:02:07
    2. State Challenges 00:08:29
    3. Getting Started with Reducers 00:08:28
    4. Adding Actions 00:03:57
    5. Finishing the First Reducer 00:03:11
    6. Registering the Application Store 00:01:56
    7. Selecting Data from State 00:04:17
    8. Dispatch Actions 00:05:24
    9. More Actions and Adding Ingredients 00:07:53
    10. Dispatching Update and Deleting Shopping List Actions 00:06:55
    11. Expanding App State 00:05:01
    12. Editing the Shopping-List via NgRx 00:07:21
    13. Managing all Relevant State 00:03:56
    14. Authentication and Side Effects – Introduction 00:02:52
    15. Setting up the Auth Store Files 00:06:05
    16. The Reducer 00:03:51
    17. Adding Reducer Logic & Actions 00:02:36
    18. Adjusting the App Module Setup 00:02:54
    19. Using Authentication 00:05:18
    20. Dispatch Actions 00:04:23
    21. Getting State Access in Http Interceptor 00:06:25
    22. Handling the Auth Token 00:01:58
    23. Only React to Actions Once via take(1) 00:02:47
    24. A Closer Look at Effects 00:03:21
    25. Auth Effects and Actions 00:03:03
    26. Effects - How they Work 00:04:59
    27. Adding Auth Signup 00:09:19
    28. Adding Auth Signin 00:04:47
    29. Navigation as a Side Effect 00:01:22
    30. Handling Logout via NgRx 00:02:13
    31. Additional Fixes 00:01:20
    32. Redirecting Upon Logout 00:02:03
    33. What's Next? 00:03:11
    34. The Router Store Package 00:01:46
    35. Store Devtools 00:05:54
    36. Lazy Load and Dynamic Injection 00:07:54
    37. Adding Recipe Actions 00:04:23
    38. Adding Recipe Reducers 00:05:39
    39. Dispatching and Selecting State 00:04:46
    40. Viewing and Deleting Recipes via NgRx 00:07:39
    41. Editing and Updating Recipes via NgRx 00:05:44
    42. Recipes Side Effects - Fetching from Server 00:09:49
    43. Recipes Side Effects - Storing Recipes on Server 00:04:59
    44. Cleaning Up 00:03:12
    45. Wrap Up 00:01:08
  25. Chapter 25 : Bonus: Angular Universal
    1. Module Introduction 00:03:04
    2. A Look at the Prequisites 00:02:54
    3. Creating the Server Main File (main.server.ts) 00:06:13
    4. Working on the tsconfig Configuration 00:05:15
    5. Handling SSR as a New App (in .angular-cli.json) 00:06:18
    6. Creating the Server 00:14:27
    7. Wrap Up 00:01:43
  26. Chapter 26 : Angular Animations
    1. Introduction 00:01:04
    2. Setting up the Starting Project 00:00:53
    3. Animations Triggers and State 00:07:12
    4. Switching between States 00:02:04
    5. Transitions 00:01:55
    6. Advanced Transitions 00:05:22
    7. Transition Phases 00:03:57
    8. The "void" State 00:06:11
    9. Using Keyframes for Animations 00:05:32
    10. Grouping Transitions 00:02:11
    11. Using Animation Callbacks 00:02:38
  27. Chapter 27 : A Basic Introduction to Unit Testing in Angular Apps
    1. Introduction 00:01:19
    2. Why Unit Tests? 00:02:13
    3. Analysing the Testing Setup (as created by the CLI) 00:08:01
    4. Running Tests (with the CLI) 00:02:00
    5. Adding a Component and some fitting Tests 00:06:15
    6. Testing Dependencies: Components and Services 00:06:56
    7. Simulating Async Tasks 00:09:42
    8. Using "fakeAsync" and "tick" 00:02:14
    9. Isolated vs Non-Isolated Tests 00:06:10
  28. Chapter 28 : Course Roundup
    1. Introduction 00:01:33
  29. Chapter 29 : Custom Project & Workflow Setup
    1. Introduction 00:00:44
    2. Initializing the Project 00:00:48
    3. Setting up the Basic Project Files 00:03:17
    4. Installing the Core Dependencies 00:02:15
    5. Filling the Project Files with Some Life 00:09:35
    6. index.html & Polyfills 00:02:06
    7. Installing Development Dependencies 00:01:46
    8. Setting up a Development Workflow 00:11:13
    9. Finishing & Using the Development Workflow 00:01:30
    10. Setting up a Production Workflow 00:09:49
    11. Adding Types & Fixing Bugs 00:03:48
    12. Finishing Touches 00:02:56