angular4-testing/blog-complete/app/blog/blog-entry.component.ts

19 lines
433 B
TypeScript

import {Component, Input} from '@angular/core';
import {BlogEntry} from './blog-entry';
import {AppComponent} from "./app.component";
@Component({
moduleId: module.id,
selector: 'app-blog-entry',
templateUrl: 'blog-entry.component.html'
})
export class BlogEntryComponent {
@Input() blogComponent: AppComponent;
@Input() entry: BlogEntry;
deleteBlogEntry(id:number) {
this.blogComponent.deleteBlogEntry(id);
}
}