Software Engineer by profession and a Teacher, Motivational Speaker by heart. ❤️
I love to share my knowledge by creating Coding & Interview preparation classes, also free classes session.
Thanks for your valueable feedback.
I create it more simplely, also try it for freshers, who can easily understand , what is component interaction in angular, then they can use observaables, services as per their requirements. We can use observables as well and services. Also ngRx (State Management) is a different thing, it is for how we can manage state in angular, here I am explaining angular component interaction. for NgRx (State Management) will write another article.
Thank you again for your feedback.
Keep smiling
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What you are describing here is totally a bad practice and no one should use it.
To interact with parent component via child component is making too much coupling and actually it creates unreadable code.
I didn't saw not even one observable here why?
In the service you should have observables and the component should subscribe with async pipe instead relying on Zone change detection mechanism.
If you now change the strategy of the component to OnPush you will end up with broken and not working code.
I recommend you also for advanced architectures ngrx to be used with Facade pattern.
Regards!
Thanks for your valueable feedback.
I create it more simplely, also try it for freshers, who can easily understand , what is component interaction in angular, then they can use observaables, services as per their requirements. We can use observables as well and services. Also ngRx (State Management) is a different thing, it is for how we can manage state in angular, here I am explaining angular component interaction. for NgRx (State Management) will write another article.
Thank you again for your feedback.
Keep smiling