DEV Community

Discussion on: Change Detection: When using setTimeout() is not your best option

Collapse
johnl4 profile image
John Lusk

Dumb question: can you also set the filter up in the parent's ngOnInit()?

Collapse
scooperdev profile image
Stephen Cooper Author

My guess, without actually trying, would be that it should also work.

However, they are run at different times in the component setup so we do need to take some care when moving code between the two in our applications.