首页 文章

角度为jwt的模块名称,角度为6

提问于
浏览
1

我使用 npm install angular2-jwt 但这不适用于角度6,在/node_modules/angular2-jwt/angular2-jwt.js中获得编译错误/ node_modules / rxjs / Observable“' has no exported member ' Observable” .

2 回答

  • 1

    你需要像这样导入它,

    import { JwtModule } from '@auth0/angular-jwt';
    

    在你的服务中,

    import { JwtHelperService } from '@auth0/angular-jwt';
    
  • 1

    对于角度6安装@auth0/angular-jwt而不是 angular2-jwt .

    使用 npm i @auth0/angular-jwt 了解更多详情,请参阅link .

相关问题