From 6b90ecb9e7228fe14610d7ddd151dcde5991c8ba Mon Sep 17 00:00:00 2001 From: Steve Hobbs Date: Fri, 7 Feb 2020 23:36:42 +0000 Subject: [PATCH] Fixed package name, updated versions in readme (#635) --- README.md | 11 ++++++----- package.json | 2 +- src/app/app.module.ts | 19 ++++++++----------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index f14becd9..681ec3c5 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![npm version](https://badge.fury.io/js/%40auth0%2Fangular-jwt.svg)](https://badge.fury.io/js/%40auth0%2Fangular-jwt) -### **NOTE:** This library is now at version 3 and is published on npm as `@auth0/angular-jwt`. If you're looking for the pre-v1.0 version of this library, it can be found in the `pre-v1.0` branch and on npm as `angular2-jwt`. +### **NOTE:** This library is now at version 4 and is published on npm as `@auth0/angular-jwt`. If you're looking for the pre-v1.0 version of this library, it can be found in the `pre-v1.0` branch and on npm as `angular2-jwt`. -**@auth0/angular-jwt v3 is to be used with Angular v6+ and RxJS v6+. For Angular v4.3 to v5+, use @auth0/angular-jwt v1** +**@auth0/angular-jwt v4 is to be used with Angular v6+ and RxJS v6+. For Angular v4.3 to v5+, use @auth0/angular-jwt v1** This library provides an `HttpInterceptor` which automatically attaches a [JSON Web Token](https://jwt.io) to `HttpClient` requests. @@ -78,9 +78,10 @@ export class AppComponent { constructor(public http: HttpClient) {} ping() { - this.http - .get("http://example.com/api/things") - .subscribe(data => console.log(data), err => console.log(err)); + this.http.get("http://example.com/api/things").subscribe( + data => console.log(data), + err => console.log(err) + ); } } ``` diff --git a/package.json b/package.json index 0d005361..3ee1d1d4 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "angular2-jwt", + "name": "@auth0/angular-jwt", "version": "4.0.0", "scripts": { "ng": "ng", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 021a116a..d524aa84 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,18 +1,15 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { AppComponent } from './app.component'; -import {JwtModule} from 'angular-jwt'; -import {HttpClientModule} from '@angular/common/http'; +import { BrowserModule } from "@angular/platform-browser"; +import { NgModule } from "@angular/core"; +import { AppComponent } from "./app.component"; +import { JwtModule } from "angular-jwt"; +import { HttpClientModule } from "@angular/common/http"; export function tokenGetter() { - return 'SOME_TOKEN'; + return "SOME_TOKEN"; } - @NgModule({ - declarations: [ - AppComponent - ], + declarations: [AppComponent], imports: [ BrowserModule, HttpClientModule, @@ -25,4 +22,4 @@ export function tokenGetter() { providers: [], bootstrap: [AppComponent] }) -export class AppModule { } +export class AppModule {}