angular - How to Object Data from child component to parent component -


i want pass object data child component parent component.

<section class="grey_bg"> <app-search></app-search> <table>     <tbody>         <tr *ngfor="let contest of contests">             <td>{{contest.contest_date}}</td>             <td>{{contest.prize_pool}}</td>             <td>{{contest.points}}</td>             <td>${{contest.entry_fee}}</td>         </tr>     </tbody> </table> 

get data child component search component has selected app-search has contest data

this.authservice.getusercontests().subscribe(     contests => {       this.contests = contests.data      } 

the easiest ways share information between parent , child components can found in cookbook provided angular team.

the specific technique should focus on, output() via eventemitter described here.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -