Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.router.navigate(
- [`/tickets/buy`],
- {
- queryParams: {
- event: event.id
- }
- }
- )
- constructor(private router: Router) {}
- public navigateWithSomeState(): void {
- this.router.navigateByUrl('/tickets/buy', {
- state: что угодно
- });
- }
- class BuyTicketsComponent {
- constructor(router: Router) {
- console.log(router.getCurrentNavigation().extras.state);
- }
- }
Add Comment
Please, Sign In to add comment