I want to pass an html ngModel value <kendo-dropdownlist style=" width: 92%;" [data]="year" [(ngModel)]="selectedYear"> which is located on Combocomponent.html, to a service which is called Home.service.ts.
Inside the service I have this code:
configUrl1 = 'https://localhost:44361/api/Active_Serviced_Outlets?Year=2021&quarter=1&month=1';
getMethod1() {
return this.http.get(this.configUrl1);
}
I want to dynamically pass the [(ngModel)]="selectedYear" value to selected Year so every time the user inputs an year.
ComboComponent.html
<div class="row">
<div class="column">
<p> <b>Year </b></p>
<kendo-dropdownlist [data]="year" [(ngModel)]="selectedYear"></kendo-dropdownlist>
</div>
<div class="column">
<p> <b>Month</b></p>
<kendo-dropdownlist [data]="Month" [(ngModel)]="selectedMonth"> </kendo-dropdownlist>
</div>
<div class="columnA">
<p> <b>Quarter</b></p>
<kendo-dropdownlist style=" width: 92%;" [data]="Quarter" [(ngModel)]="selectedQuarter"> </kendo-dropdownlist>
</div>
</div>
<br />
<!--<div class="example-config">
Selected Values: {{selectedYear}} {{selectedMonth}} {{selectedQuarter}}
</div>-->
Thank you!