import { Component } from '@angular/core' ; import { Category , getCategories , getCategory } from '../category/category' ; @ Component ( { selector : 'db-welcome' , templateUrl : 'app/welcome/welcome.component.html' } ) export class WelcomeComponent { slideCategories : Category [ ] = [ getCategory ( '1' ) , getCategory ( '2' ) , getCategory ( '3' ) ] ; cardCategories : Category [ ] = getCategories ( ) ; selectCategory ( category ) { console . log ( 'Selected category' , category . title ) ; } }