import { ChangeDetectionStrategy , Component } from '@angular/core' ; import { Router } from '@angular/router' ; @ Component ( { selector : 'medium-stories-user' , templateUrl : './user.component.html' , styleUrls : [ './user.component.scss' ] , changeDetection : ChangeDetectionStrategy . OnPush } ) export class UserComponent { constructor ( private router ) { } onClick ( ) { this . router . navigate ( [ '/users' ] ) ; } }