<app-example [id]="requestId"></app-example>
We have add the selector in another component with passing the id.
export class exampleComponent implements OnInit {
@Input() id:number;
Id:string;
}
constructor(private fb: FormBuilder, private _AppService: AppService, private router: Router, private route: ActivatedRoute) {
this.router.getCurrentNavigation().extras.state != undefined ? this.Id = this.router.getCurrentNavigation().extras.state.key : '';
this.route.data.subscribe(data => {
this.current_path = data.urlname;
})
}
we've using the getCurrentNavigation() method, but its return null value