import { Component , Input } from '@angular/core' ; import { History } from '../../models/history' ; class @ Component ( { selector : 'history-dropdown-list' , templateUrl : 'template.html' , } ) export class HistoryDropdownList { @ Input ( ) public title : string ; @ Input ( ) public items : History [ ] ; private show : boolean = false ; return { void } public toggleItem ( ) { this . show = ! this . show ; } return { boolean } public presentGroup ( ) { return this . show ; } }