DEV Community

loading...

Discussion on: Things to watch out for when using HMR with Angular

Collapse
layzee profile image
Lars Gyrup Brink Nielsen

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.