After encountering numerous instances of code containing the subscribe method in Angular, I began to wonder about the consequences of not utilizing them. What are we potentially missing out on?
I've noticed that all the code snippets using subscribe are written within the constructor rather than ngOnInit. Why is this practice so common?
constructor(private router: Router) {
m_Router.events.filter(event => event instanceof XComponent)
.subscribe(e => {
...
});
}