The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

452573 (1) [Avatar] Offline

in the code example in Chapter 6.6 Helper service (also on GIT I do not understand where "localStorage" is coming from.

I do see neither import of localStorage nor any other initialization like through DI.

Could you please shortly describe?

Kind regards,
jeremy.wilken (208) [Avatar] Offline
Great question, and something I didn’t clarity as well as I could have. The localStorage API is a browser feature, not Angular. There is no need to inject it, you just use it (just like window or document).