Skip to content

mrsan22/Angular-Reactive-Forms

Repository files navigation

AngularReactiveForms

This project was generated with Angular CLI version 1.0.0 and Angular 4.1.0.

This project is about 'me' learning to create Angular Reactive Forms by following offical style guide and best practices. It has a simple signup/login page with very basic functionalities. However, I have tried to follow best practices and somethings may seem overkill (like creating Routing Module) for such a small project. Though the main focus of this project is 'Switching from Template driven forms to Reactive forms', it also has some other cool things. So, check it out and feel free to fork, update, plug in your project etc.

Highlights

  • Small baby commits to show how to transform the template driven forms to reactive forms.
  • Form Validation with custom directives and validators using FormControl/AbstractControl.
  • Using MockBackend to fake backend services for the api calls.
  • The project structure follows Angular style guide and other best practices.

References

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The app 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/module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the -prod flag for a production build.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor. Before running the tests make sure you are serving the app via ng serve.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

About

Angular project that explores the world of Reactive forms with MockBackend functionality

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published