Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@angular/forms
Advanced tools
The @angular/forms package is a part of the Angular framework that provides tools for creating and managing forms in Angular applications. It offers two approaches: Reactive Forms and Template-driven Forms, which allow developers to handle user input and form validation in a robust and scalable way.
Reactive Forms
Reactive Forms provide a model-driven approach to handling form inputs whose values change over time. This feature allows for more flexible, scalable, and testable forms.
import { ReactiveFormsModule } from '@angular/forms';
@NgModule({
imports: [
// other imports ...
ReactiveFormsModule
],
})
export class AppModule { }
Template-driven Forms
Template-driven Forms are useful for adding simple forms to your app with minimal setup. They are less flexible than Reactive Forms but can be easier to use for basic scenarios.
import { FormsModule } from '@angular/forms';
@NgModule({
imports: [
// other imports ...
FormsModule
],
})
export class AppModule { }
Form Validation
The package provides built-in validators as well as the ability to create custom validators, making it easy to implement complex validation logic for form fields.
import { FormControl } from '@angular/forms';
let email = new FormControl('', [Validators.required, Validators.email]);
Form Groups
Form Groups are used to group together multiple form controls into one object, allowing for easier management of form data and validation.
import { FormGroup, FormControl } from '@angular/forms';
let userForm = new FormGroup({
firstName: new FormControl(),
lastName: new FormControl(),
age: new FormControl()
});
React Hook Form is a library for React that enables the management of forms with minimal re-renders. It is similar to @angular/forms in providing form validation and form state management, but it is designed specifically for React and uses hooks.
Formik is another popular form library for React. It simplifies the process of building, validating, and handling forms. It is comparable to @angular/forms in its functionality but is tailored to the React ecosystem.
Redux Form leverages Redux for form state management in React applications. It is similar to @angular/forms in that it handles form state and validation, but it integrates tightly with Redux for state management.
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
Usage information and reference details can be found in Angular documentation.
License: MIT
17.0.7 (2023-12-13)
| Commit | Type | Description | | -- | -- | -- | | 4fd5409090 | fix | handle ambient types in input transform function (#51474) |
| Commit | Type | Description | | -- | -- | -- | | a603338fe8 | fix | generate less type checking code in for loops (#53515) |
| Commit | Type | Description | | -- | -- | -- | | 58ed76be93 | fix | Avoid refreshing a host view twice when using transplanted views (#53021) | | c16b5e8290 | fix | Multiple subscribers to ApplicationRef.isStable should all see values (#53541) | | 17dbf8b8e2 | fix | remove signal equality check short-circuit (#53446) | | 5b4add27b6 | fix | update feature usage marker (#53542) | | 68d111c841 | perf | avoid changes Observable creation on QueryList (#53498) | | 044cb553b4 | perf | optimize memory allocation when reconcilling lists (#52245) |
| Commit | Type | Description | | -- | -- | -- | | 96ab999698 | fix | CF Migration - ensure bound ngIfElse cases ignore line breaks (#53435) | | c9a1c6f1c7 | fix | cf migration - undo changes when html fails to parse post migration (#53530) | | b75aca1d74 | fix | CF migration only remove newlines of changed template content (#53508) | | e88a12d5b3 | fix | cf migration validate structure of ngswitch before migrating (#53530) | | 543df3dca5 | fix | ensure we do not overwrite prior template replacements in migration (#53393) | | d232ea143f | fix | fix cf migration import removal when errors occur (#53502) |
| Commit | Type | Description | | -- | -- | -- | | d5c631bf36 | fix | Get correct base path when using "." as base href when serving from the file:// protocol. (#53547) |
| Commit | Type | Description | | -- | -- | -- | | e750e4edcf | fix | provide more actionable error message when route is not matched in production mode (#53523) |
<!-- CHANGELOG SPLIT MARKER --><a name="17.0.6"></a>
FAQs
Angular - directives and services for creating forms
The npm package @angular/forms receives a total of 2,355,070 weekly downloads. As such, @angular/forms popularity was classified as popular.
We found that @angular/forms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.