How to store token in Local or Session Storage in Angular 2?

前端 未结 9 2208
渐次进展
渐次进展 2020-11-27 12:27

I want to use Local or session storage to save authentication token in angular 2.0.0. I use angular2-localstorage

9条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-27 13:18

    Here is the best practice: https://github.com/PillowPillow/ng2-webstorage

    I was use it in AngularJs, now with Angular2. Wery usefull.

提交回复
热议问题