I am in new in Angular 6. I am creating an app using Angular 6. During development I ran into a problem which is to share the data between components. Here is the code:
I have two components 1) Signup 2) Verification
Signup is opened from route /signup and verification is opened from /verification.
Now what i want to pass the object from signup to verification component
Here is my sample code.
signup(){
  let someobject = {"name":"name"} // this data I want to pass in verification
  this.router.navigateByUrl('/verfication);
}
// second is the verfication component
export class verfication Component implements OnInit {
    constructor() { }
    ngOnInit() { }
}
 
     
     
    