私はダッシュボードのサイドバーのページでカテゴリリストコンポーネントリスト どのようにangle2の親同期通信にルータ - 出口を達成するには?
@Component({
selector: 'dashboard',
template: '<category-list></category-list>
<header-top></header-top>
<router-outlet></router-outlet>'
})
export class Dashboard{
constructor() {
}
}
以下のすべてのカテゴリのように見えるのダッシュボードコンポーネントを持っている、と「/ダッシュボード」のベースルーティングは最初のすべてのリストをロードしますrouter-outlet(編集オプションもありますが、ここで編集する必要があります)、ルーターアウトレットの子と親の兄弟との通信に最適な方法は何ですか?
カテゴリリストのコンポーネントは、ルータのコンセント内部の私の子コンポーネントが
@Component({
selector: 'category-list-edit',
template: ''
})
export class DashboardCategoryList{
constructor() {
}
}
のように見えます
@Component({
selector: 'category-list',
template: "all category list"
})
export class DashboardCategoryList{
constructor() {
}
}
カテゴリリスト編集で編集がカテゴリ一覧に反映されるべきです、どのようにこれを達成することができますか?
可能な重複://stackoverflow.com/questions/36325212/angular-2-dynamic-tabs-with-user-click-chosen-components) – Niyaz