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
Post a Comment