
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
ngx-typed-reactive-form
Advanced tools
It is an attempt to bring types to Angular's Reactive Forms using generics. For the sake of intellisense and better developer experience.
Online demo: strongly typed reactive form on Stackblitz
Valuechanges
, value
, etc.export interface UserDto {
name: string;
about: string;
registered: string;
}
TypedFormBuilderConfig
based on the model, to use with Reactive Forms FormBuilder
:export const USER_FORM_CONFIG: TypedFormBuilderConfig<UserDto> = {
/** NOTE: value is strongly typed */
name: ['John Doe', Validators.required],
about: ['This is a generic description', Validators.required],
registered: ['1992-12-12', Validators.required],
};
export class DemoComponent implements OnInit {
public userFormGroup: TypedFormGroup<UserDto>;
constructor(private fb: FormBuilder) {}
ngOnInit(): void {
this.userFormGroup = this.fb.group(USER_FORM_CONFIG) as TypedFormGroup<UserDto>;
}
}
<input [formControl]="userFormGroup.controls.name" />
Don't forget to star in on github if you like it.
FAQs
Make Angular Reactive Forms strongly typed with generics.
We found that ngx-typed-reactive-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.