0
プロパティの子要素にアクセスする必要があります。アングル2親コンポーネントクラスの子コンポーネントオブジェクトにアクセスする
親:
<div>
<shipment-detail #myCarousel ></shipment-detail>
</div>
@Component({
selector: "testProject",
templateUrl: "app/partials/Main.html")
class AppComponent {
getChildrenProperty() {
// I want to get access to "shipment"
}
}
子供:
@Component({
selector: "shipment-detail",
})
export class ShipmentDetail {
shipment: Shipment;
}
anglejsの代わりにangleタグを編集する – Rahul
**親コンポーネントからの[angle 2アクセスの子コンポーネントプロパティ]の正確な**複製(https://stackoverflow.com/questions/36628161/angular-2-access-child-親コンポーネントからのコンポーネントのプロパティ) – LarsMonty
角度が更新され、私はそれを助けてくれなかったcommenと尋ねてみました。 –