import { Component , EventEmitter , Input , Output } from '@angular/core' ; import { HsHistoryListService } from '../../../../common/history-list/history-list.service' ; @ Component ( { selector : 'hs-common-url' , templateUrl : './url.component.html' , } ) export class HsCommonUrlComponent { items ; what ; @ Input ( ) type : any ; @ Input ( ) url : any ; @ Output ( ) urlChange = new EventEmitter < any > ( ) ; @ Output ( ) connect = new EventEmitter < any > ( ) ; constructor ( private historyListService ) { this . items = this . historyListService . readSourceHistory ( this . what ) ; } emitConnect ( ) { this . connect . emit ( ) ; } change ( ) { this . urlChange . emit ( this . url . trim ( ) ) ; } historySelected ( url ) { this . url = url ; this . change ( ) ; } }