import { Component , Input , OnInit } from '@angular/core' ; import { Router } from '@angular/router' ; import { IUser } from '../../interfaces/user.interface' ; @ Component ( { selector : 'app-user-card' , templateUrl : './user-card.component.html' , styleUrls : [ './user-card.component.scss' ] , } ) export class UserCardComponent implements OnInit { @ Input ( 'user' ) user : IUser ; constructor ( private router ) { } ngOnInit ( ) { } cardClicked ( ) { this . router . navigate ( [ `/users/${ this . user . login . uuid }` ] , { queryParams : { ts : Date . now ( ) , } , } ) ; } }