import { Component , OnInit } from '@angular/core' ; import { ActivatedRoute } from '@angular/router' ; import { JhiDataUtils } from 'ng-jhipster' ; import { IEvent } from 'app/shared/model/event.model' ; @ Component ( { selector : 'jhi-event-detail' , templateUrl : './event-detail.component.html' } ) export class EventDetailComponent implements OnInit { event : IEvent ; constructor ( protected dataUtils , protected activatedRoute ) { } ngOnInit ( ) { this . activatedRoute . data . subscribe ( ( { event } ) => { this . event = event ; } ) ; } byteSize ( field ) { return this . dataUtils . byteSize ( field ) ; } openFile ( contentType , field ) { return this . dataUtils . openFile ( contentType , field ) ; } previousState ( ) { window . history . back ( ) ; } }