Skip to content

This web application features dynamic registration forms with custom validations, integration with external APIs for news and test data, and reusable directives for enhanced user input control.

Notifications You must be signed in to change notification settings

sanidhyajadaun/codev-angular

Repository files navigation

Codev

This project was generated with Angular CLI version 15.2.10.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Features by Component:

Reactive Form Component:

Registration Form:

  • Username validation with custom directive for forbidden names and minimum length.
  • Email validation with pattern matching.
  • Password and Confirm Password validation using a custom validator.
  • Phone number validation with custom directive allowing only numeric input.
  • OTP input with dynamic control creation.
  • Address details with City, State, and Postal Code.
  • Subscription checkbox for promotional offers.
  • File upload for Profile Image.
  • Form-wide validation for matching passwords.

Form Validation:

  • Custom validation for minimum username length and forbidden names.
  • Dynamic phone number validation with length check.

Local Storage Handling:

  • Loading data from local storage to populate the form (commented out in the code).

Template-Based Form Component:

News API:

  • Fetching news articles from a News API.
  • Displaying news articles in the template.

Test API:

  • Interaction with a test API (connectivity to localhost server).
  • Displaying API data in the template.

Shared Directive:

Allownumbersonly Directive:

  • Allowing only numeric input in specified form fields (Phone Number).

Allowtextonly Directive:

  • Allowing only text input in specified form fields (Username).

digitsonly Directive:

  • Allowing only digit input in OTP field.

otp-focus Directive:

  • Fowardung and backwarding of OTP boxes.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

About

This web application features dynamic registration forms with custom validations, integration with external APIs for news and test data, and reusable directives for enhanced user input control.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published