Skip to content
KnowledgeCity

Angular Advanced: Validators, Interceptors, and Guards

Learn how to create validation in reactive forms and learn how to use route guards
Preview the first lesson free — get full access to all 5 lessons.
Course: On-Demand
Advanced Provider Farhan Saleem  5 Lessons ·  29m  in English 

Course Description

Building user forms is a critical part of any modern UI application. As developers, we need to implement many common validation functions that are available to us to put together for most common scenarios in user forms. You will learn how to create custom validators for creating customized validations you need for your application. You will also learn what Angular route guards are, how they are configured for routes, and how can you protect access to pages and UI components by configuring logic in these guards. We’ll also cover how to set different levels of access in nested routes or pages. Angular gives you the ability to create guards to customize authentication and restrict access to any content on any level in your application.

In these lessons on Validation and Route Guards, you will learn how to create robust validation in reactive forms. You will learn to use out-of-the-box form validation provided to developers in Angular framework, as well create custom validation to handle complex scenarios. You will also learn how to use route guards to write custom logic to check whether the user can be allowed access to routes and pages.

What You'll Learn

  • Create custom validators to build tailored validations for your application's user forms
  • Use out-of-the-box form validation provided by the Angular framework in reactive forms
  • Show or hide validation errors to handle complex validation scenarios
  • Configure Angular route guards to protect access to pages and UI components
  • Write custom guard logic to check whether a user can access routes and pages
  • Set different levels of access in nested routes and restrict content at any level

Key Takeaways

  • Building user forms is a critical part of any modern UI application, and validation handles most common scenarios in those forms.
  • Angular provides out-of-the-box form validation, and developers can also create custom validators for complex scenarios.
  • This course teaches how to create robust validation in reactive forms.
  • Route guards let developers write custom logic to determine whether a user is allowed access to routes and pages.
  • Angular guards can customize authentication and restrict access to content at any level in the application, including nested routes.

Frequently Asked Questions

What does this course cover?

It covers creating custom validators and robust validation in Angular reactive forms, showing or hiding validation errors, and using route guards to restrict access to routes, pages, and UI components, including setting different access levels in nested routes.

Who is this course for?

It is for developers building user forms in modern UI applications who want to implement both out-of-the-box and custom validation in reactive forms and control access to pages using route guards.

What skills will I gain?

You will gain skills in Angular, Angular Components, Angular Reactive Forms, Angular UI, Ng Controller, and Validation Controls.

What lessons are included?

The lessons are Custom Validators, Show or Hide Validation Errors, Restricting Routes With Angular, Guards in Angular, and Using a Guard in Application.

What will I be able to do with route guards after this course?

You will be able to configure guards for routes, write custom logic to check whether a user can access routes and pages, customize authentication, and restrict access to content at any level, including nested routes.