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); } }