I have an experience as a software engineer and I am a graduate in information systems and now I'm using angular at my company, I so love very much work as a software engineer until every time I code,
👨🏫 Co-Founder of This is Learning, Organizer of AarhusJS
✍️ Writer, Speaker, FOSS Maintainer 📗 Author
🏆 Microsoft MVP 🌟 GitHub Star
🌊 Nx Champion 🦸 Angular Hero of Education
What do u think . If I use a subscribe in service?
There's no problem with that. Services have
ngOnDestroy
hook as well. You can use it for clean up. coryrylan.com/blog/using-ngondestr...That's good advice. Just don't try to use ngOnInit. It doesn't work for services. Instead, use the service constructor or an Angular initializer.