compra.component.ts
502 Bytes
import { Component, OnInit } from '@angular/core';
import { Router, ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-compra',
templateUrl: './compra.component.html',
styleUrls: ['./compra.component.css']
})
export class CompraComponent implements OnInit {
public eventid
constructor(
private route: ActivatedRoute,
private router: Router,
) { }
ngOnInit(): void {
this.route.paramMap.subscribe(
(params) => {
this.eventid = params.get('id');
}
);
}
}