This project is a multi-step registration form built with Angular CLI version 13.3.5. It demonstrates best practices for creating a seamless user experience while collecting user information through multiple form sections. The project showcases form validation, custom directives, and state management in Angular without using third-party libraries or UI components.
- The registration form contains three steps for data entry and one final step for previewing the entered data before submission.
- Steps:
- First step: Collects personal details (name, company, age)
- Second step: Collects contact details (phone, email, LinkedIn)
- Third step: Collects address details (street, unit, city, state, zip)
- Final step: Previews all the steps and provides the user with an option to submit if the form is valid
- Implementation Highlights:
- Robust validation and pattern matching for all fields
- Autocomplete functionality for the 'state' field
- Navigation between steps using browser back and forward buttons or previous and next buttons on the form
- Retains previously entered values when navigating back
- No third-party or open-source libraries (e.g., Angular Material) were used for the form fields
- Comprehensive test suite with 100% code coverage using Jest as the testing framework
If you would like to install this repo on your local machine for testing, follow these steps in Terminal (Mac user)
mkdir -p ~/Developer
cd ~/Developer
git clone https://github.com/mgennings/multi-step-registration.git
cd multi-step-registration
npm install && ng serve
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.
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
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
The project uses Jest for running unit tests and ensuring 100% code coverage. To execute the unit tests, run npm test
. The test results will be displayed in the terminal, and a code coverage report will be generated in the coverage/ directory.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
We welcome contributions to the Multi-Step Registration project. If you would like to contribute, please follow these steps:
- Fork the repository on GitHub.
- Create a feature branch for your changes (
git checkout -b feature/my-feature
). - Commit your changes, following our commit message guidelines.
- Push your changes to your feature branch on your fork (
git push origin feature/my-feature
). - Create a pull request from your feature branch to the main repository's
main
ormaster
branch.
Please ensure that your code follows our coding standards and includes appropriate tests and documentation. If you need help or have any questions, feel free to create an issue on GitHub or reach out to the maintainers.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.