O'Reilly logo

Hands-on Full Stack Development with Angular 5 and Firebase by Uttam Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a signup component

A signup component is a controller and it is used to react to a user's action, such as sign up or cancel. It is injected with the following two services:

  • Authentication service: It provides authentication-related functionalities, such as login, signup, and logout
  • User service: It interacts with the Firebase database to store extra user information, such as the mobile number and name.

The constructor of the signup component accepts authentication and user services, as follows:

constructor(private authService: AuthenticationService, private userService: UserService) {}

When the user clicks on the SIGNUP button, the onSignup method is called. It accepts form data as a parameter, which has user-typed information. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required