@0x404/ngrx-forms 中文文档教程
ngrx-forms
ngrx-forms< /strong> 将 redux 状态管理模型的优势带到了使用 Angular 和 ngrx 的应用程序中的表单世界。 Angular 提供的用于处理表单的机制本质上是可变的、本地的并且难以调试。 这个库提供了一个不同的模型来处理表单。 我们没有将表单控件的状态存储在组件中,而是将它们放在 ngrx 存储中。 我们使用允许像任何其他 redux 应用程序一样轻松调试的操作来更新状态。 ngrx-forms 还提供强大的机制来更新、验证和管理大型复杂表单。 它包含用于同步和异步验证、创建动态表单、与自定义表单元素集成等的 API。
Installation
npm install ngrx-forms --save
此库对 @angular/core
、@angular/common
、@angular/forms
和 @ngrx/ 有对等依赖store
,因此请确保安装了这些包的适当版本。
Bug reports
要报告错误,请在代码沙箱中提供问题的重现。 你可以 fork 这个例子。
Contributing
请参阅文档。
License
除非另有说明,否则此存储库中的所有内容均根据 MIT 许可证获得许可。
版权所有 (c) 2017 年至今 Jonathan Ziller
ngrx-forms
ngrx-forms brings the strengths of the redux state management model to the world of forms in applications that are using Angular and ngrx. The mechanisms that Angular provides for working with forms are inherently mutable, local, and hard to debug. This library offers a different model for working with forms. Instead of storing the state of form controls inside the components we put them in the ngrx store. We update the state with actions which allows easy debugging just like any other redux application. ngrx-forms also provides powerful mechanisms to update, validate and generally manage large complex forms. It contains APIs for synchronous and asynchronous validation, creating dynamic forms, integrating with custom form elements, and much more.
To get to know more you can either read the official documentation or visit the example application.
Installation
npm install ngrx-forms --save
This library has a peer dependency on @angular/core
, @angular/common
, @angular/forms
, and @ngrx/store
, so make sure appropriate versions of those packages are installed.
Bug reports
To report a bug please provide a reproduction of the issue in a code sandbox. You can fork this example.
Contributing
Please see the documentation.
License
Everything in this repository is licensed under the MIT License unless otherwise specified.
Copyright (c) 2017-present Jonathan Ziller