import { Component, OnInit } from '@angular/core'; import {ActivatedRoute, Params} from '@angular/router'; import {TokenService} from '../../../_services'; @Component({ selector: 'app-token-details', templateUrl: './token-details.component.html', styleUrls: ['./token-details.component.scss'] }) export class TokenDetailsComponent implements OnInit { token: any; constructor( private route: ActivatedRoute, private tokenService: TokenService ) { this.route.paramMap.subscribe((params: Params) => { this.token = this.tokenService.getBySymbol(params.get('id')); }); } ngOnInit(): void { } }