import { Component } from '@angular/core' ; import { Router } from '@angular/router' ; @ Component ( { selector : 'app-apps' , templateUrl : './apps.component.html' , styleUrls : [ './apps.component.scss' ] } ) export class AppsComponent { constructor ( private router ) { } onAppClicked ( app ) { this . router . navigate ( [ '/apps' , app . name , 'tasks' ] ) ; } }