Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have list component shared between various components for listing some data and a datepicker binded to an ng-model. Like

<input type="text" class="form-control"  [(ngModel)]="dateRange" 
placeholder="Pick a date range" bsDaterangepicker #dp="bsDaterangepicker"
(bsValueChange)="onDateRangeChange($event)"/>


Below are the urls formats for accessing these list component Parent Component -

JavaScript
http://localhost:4200/#/topics

Child Component

JavaScript
http://localhost/topics/Recrug-4

The issue is when I click on the parent component , the ng-model values are refreshed but when I land on the pages using the Child Components , the ngModel values are not getting refreshed

What I have tried:

As soon as the router link is clicked. I called a function to update ngmodel on the list component. For testing , I even recalled ngononit function but no sucess
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900