import { Component } from '@angular/core' ; import { ActivatedRoute , Router } from '@angular/router' ; @ Component ( { templateUrl : './photo-of-the-week.component.html' , styleUrls : [ './photo-of-the-week.component.scss' ] , } ) export class PhotoOfTheWeekComponent { constructor ( private route , private router ) { } onPhotoOfTheWeekClicked ( ) { this . router . navigate ( [ '1' ] , { relativeTo : this . route } ) ; } }