Angular Forms In Depth (Angular 20)

所在平台: Udemy

课程主页: https://www.udemy.com/course/angular-forms-course/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:深入讲解 Angular 表单(Angular 20) 课程概述:本课程是对 Angular 模板驱动和响应式表单的深入指南,并提供一个正在运行的 GitHub 仓库。Angular 常用于构建内部企业应用程序,这类应用通常涉及大量复杂的数据录入表单以及各种复杂的表单验证规则。通过 Angular 表单模块,我们可以以可扩展和用户友好的方式构建这些复杂表单。 课程内容: - 理论与实践结合,深入理解模板驱动表单和响应式表单。 - 从简单的模板驱动表单开始,掌握 ngModel 和 ngForm 的工作原理,以及数据绑定和表单验证的多种用法。 - 学习如何构建自定义表单验证器。 - 将模板驱动表单重构为响应式表单,并比较这两种方法的优缺点。 - 使用响应式表单打造复杂数据录入表单,掌握各种控件、嵌套组、控件数组、自定义验证器、异步验证器及多字段验证等高级特性。 - 制作与生产应用相似的多步骤响应式表单,通过一个完整的练习展示响应式表单的强大功能。 - 学习如何构建可重用的嵌套表单,例如地址表单,详细覆盖文件上传,构建带有进度指示器和取消上传能力的自定义文件上传控件。 - 结课时通过全面示例展示如何使用表单数组。 课程将涵盖的主要主题包括: - Angular 表单模块介绍 - Angular Material 表单组件 - 模板驱动表单和 ngModel 的工作机制 - 常见的表单验证规则与错误提示 - 使用 ngModel 进行单向绑定和双向数据绑定 - 理解 ngModelOptions - 自定义验证器 - 使用 FormBuilder 服务 - 从模板驱动表单重构到响应式表单 - 模板驱动与响应式表单的对比及使用时机 - 响应式表单中的多种 Observable 理解 - 重置和设置响应式表单的新值 - 使用响应式表单开发复杂表单 - 处理不同类型的控件:输入框、文本域、单选按钮、复选框等 - 使用 formGroup 和 formControlName、formControl 指令 - 响应式表单中的自定义验证器及针对多字段的验证 - 使用异步验证器进行后端校验 - 依赖字段设置(启用/禁用字段) - 表单草稿预保存的实现 - 构建多步骤表单 - 可重用的嵌套表单与文件上传的实现 - 表单数组的使用 学习成果:完成本课程后,您将掌握设计和开发复杂、可维护且用户友好的数据录入表单所需的所有知识。您能够实施各种常见的表单验证规则,包括最复杂的场景,熟练使用模板驱动与响应式表单,并了解何时选择使用每种表单类型。 欢迎查看课程的免费课程内容,祝您学习愉快!

课程评论(0条)

课程详情

This course is an in-depth guide to Angular template-driven and reactive forms, and it comes with a running Github repository.This Course In a NutshellAngular is very often used to build in-house enterprise applications, which are usually quite form-intensive. This type of application usually has a large number of complex data entry forms, with all sorts of complex form validation rules.Angular provides us with all the tools that we need to build these complex forms in a scalable and user-friendly way via the Angular Forms module.There are two types of forms available: template-driven and reactive forms, and we will cover both types of forms in detail in this course. We will also compare them and explain when to use each form type and why.Course OverviewWe will start this course by implementing a simple form using template-driven forms and ngModel. We will understand exactly how ngModel and ngForm work under the hood and the several ways of using these directives for both data binding and form validation.We will learn template-driven forms in detail, including how to build custom form validators using custom directives. Next, we will refactor the same template-driven form that we have built into a reactive form, and we will compare the two approaches.We will then use reactive forms to build a much more complex data entry form with all sorts of different types of controls, nested groups, arrays of controls, custom validators, asynchronous validators, multi-field validations, form draft pre-saving, and much more.The multi-step reactive form that we will be building will be something very close to what you will find in a production application, and it allow us to easily demonstrate all the powerful features of reactive forms in one large step-by-step exercise.We will learn how to build reusable nested forms (like an address form), and we will also cover file upload in detail. We will build a custom file upload control with a progress indicator and cancel upload capabilities.We will finish the course by providing a complete example demonstrating how to use Form Arrays.Table of ContentsThis course covers the following topics:- Introduction to the Angular Forms module- Angular Material form components- Template-driven Forms - how does ngModel work?- Typical Form validation rules- Form field validation error messages- Using ngModel for one-way binding and bi-directional data binding- Understanding ngModelOptions in detail- Template-driven form custom validator- How to use the FormBuilder service- Refactoring of a form from template-driven to a reactive form- Comparison between template-driven and reactive forms - when to use each and why- Why are they called reactive forms? Understanding the multiple Observables available- How to reset and set new values in a reactive form- Development of a complex form using reactive forms- How to use all types of commonly used form controls: normal inputs, text areas, radio buttons, checkboxes, calendars, auto-completion, etc.- The formGroup and formControlName, and formControl directives- Reactive forms custom validators - multi-field validation- Backend validation of a form field using async validators- Dependent fields - how to enable or disable some form fields depending on the values of other fields- Pre-saving a form draft- Building a multi-step form with Angular Material- Reusable nested forms (an address form)- Custom File Upload Form Control- Form ArraysWhat Will you Learn In this Course?At the end of the course, you will have learned everything that you need to know for designing and developing complex data entry forms, that are both maintainable and user-friendlyYou will be able to implement all sorts of commonly needed form validation rules, including the most advanced scenariosYou will feel comfortable using both template-driven and reactive forms, and you will know when to use each and whyHave a look at the course free lessons below, and please enjoy the course!

课程标签

0人关注该课程

主题相关的课程