how to refresh one component from another component?
Hi i have two components A&B. In A i am having a dropdown which contains car models.In B i am having one more dropdown contain model year.If I am selecting a car from dropdown A the available year associated with that selected car will display.All are working fine but im facing one issue that from B if i am changing any particular year A component not refreshing immediatly .Aftr page reload only am getting the new values.How i can solve this.Ngonint call is not a good way because i am having enough methodes inside that?please help
Bhairab DuttPosted May 25, 2018, 3:06 PM
If you are using Parent and Child compoent concepts then you can use the Output decorator with EventEmitter in child compoent and pass the year value to first componet .
Now first compoent will refresh the value select the car according to selected year.
Hope Its help you.
Thanks
Sujeet RamanPosted May 23, 2018, 7:12 AM
Yogesh GhorpadePosted May 22, 2018, 4:22 AM