2017-05-22 20 views
0

1ページに2つの兄弟コンポーネントがあり、2番目のコンポーネント関数を呼び出して、最初のコンポーネントリンクの値onClickイベントを渡す必要があります。別の兄弟コンポーネントのメソッドを呼び出す方法 - 角度1.5

<my-container> 
    <sibling-component1></sibling-component1> // this has link to call function 
    <sibling-component2></sibling-component2> // this has function 
</my-container> 

コードリンク:https://codepen.io/sandeep821/pen/aWQXZx?editors=1111

+0

再因子モデルとサービスにコンポーネント1からその機能。次に、component2がそのサービス内の関数を呼び出させるようにします。 – georgeawg

答えて

関連する問題