2017-02-27 01:44:23 +01:00
|
|
|
import {Component, Input} from '@angular/core';
|
|
|
|
import {BlogEntry} from './blog-entry';
|
2017-02-27 11:45:59 +01:00
|
|
|
import {AppComponent} from "./app.component";
|
2017-02-27 01:44:23 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
moduleId: module.id,
|
|
|
|
selector: 'app-blog-entry',
|
|
|
|
templateUrl: 'blog-entry.component.html'
|
|
|
|
})
|
|
|
|
export class BlogEntryComponent {
|
2017-02-27 11:45:59 +01:00
|
|
|
@Input() blogComponent: AppComponent;
|
2017-02-27 01:44:23 +01:00
|
|
|
@Input() entry: BlogEntry;
|
2017-02-27 11:45:59 +01:00
|
|
|
|
|
|
|
deleteBlogEntry(id:number) {
|
|
|
|
this.blogComponent.deleteBlogEntry(id);
|
|
|
|
}
|
|
|
|
|
2017-02-27 01:44:23 +01:00
|
|
|
}
|