I have angular 5 project with the following structure:
app.component.html
<app-header></app-header>
<app-list-view></app-list-view>
<app-footer></app-footer>
In my <app-header>
component I have a <app-search></app-search>
component:
<div id="headerContent">
<div id="logo">
<img src="../../../assets/images/logo.png"/>
</div>
<app-search></app-search>
</div>
In this search.component.html I have:
<div id="searchContent">
<input [(ngModel)]="queryString" type="text" placeholder="Bijv. PHP developer, AngularJs"/>
<button>Zoeken</button>
</div>
I would like to pass the data from the input field from the app-search
component to the app-list-view
component.
What would be the best way to do this?