See the Component Interaction cookbook. So, use @ViewChild() and add a method to ShipmentDetail that the parent can call to retrieve the shipment value, or just access the property directly, as I show below (because I was lazy and didn’t want to write an API/method):
@Component({
selector: "testProject",
templateUrl: "app/partials/Main.html",
directives: [ShipmentDetail]
})
export class AppComponent {
@ViewChild(ShipmentDetail) shipmentDetail:ShipmentDetail;
ngAfterViewInit() {
this.getChildProperty();
}
getChildProperty() {
console.log(this.shipmentDetail.shipment);
}
}
Plunker