How to call one component methods to another component in angular 2/4/6. I am using two components one is login and another one is register. In login component i have one method
login()
{
var email = email;
console.log("username", email);
var password = password;
this.loginService.loginrequest(email, password).subscribe(
data => {console.log(data)});
}
So how to this login method in registration component?