Angular 17: What use to to fetch data at the app start moment?

Discussão em 'Angular' iniciado por Alex Marat, Fevereiro 21, 2025.

  1. Alex Marat

    Alex Marat Guest

    there is an issue.

    I have Angular 17 app.

    There is a need to get a user data by http request as to keep it in localStorage and use everywhere. The request should be send once only and as earlier as possible (at the app start).

    I compare web-worker vs http interceptors to implement the described task.

    What are your thoughts? Pro-s / con-s?

    Thank you!

    Just wondering what is the best solution for the issue. May be there are best practices for that.

    Continue reading...

Compartilhe esta Página