import { Component, OnInit, Input } from '@angular/core'; import { Message, MesajGonderimEk, MessageApiService } from '@karmed/api'; import {Location} from '@angular/common'; @Component({ selector: 'app-details', templateUrl: './details.component.html', styleUrls: ['./details.component.css'] }) export class DetailsComponent implements OnInit { details: Message; ekler: MesajGonderimEk[]; constructor(private msg: MessageApiService,private loc:Location) { } ngOnInit() { this.details = history.state.okunan; if (this.details.EkVar) this.getAttachment(this.details.Id); } getAttachment(msgId: number) { this.msg.getAttachment(msgId).subscribe(req => { this.ekler = req; }) } back(){ this.loc.back(); } }