Skip to content

Commit 6b90ecb

Browse files
author
Steve Hobbs
authored
Fixed package name, updated versions in readme (#635)
1 parent 4a7b98e commit 6b90ecb

3 files changed

Lines changed: 15 additions & 17 deletions

File tree

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[![npm version](https://badge.fury.io/js/%40auth0%2Fangular-jwt.svg)](https://badge.fury.io/js/%40auth0%2Fangular-jwt)
44

5-
### **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`.
5+
### **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`.
66

7-
**@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**
7+
**@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**
88

99
This library provides an `HttpInterceptor` which automatically attaches a [JSON Web Token](https://jwt.io) to `HttpClient` requests.
1010

@@ -78,9 +78,10 @@ export class AppComponent {
7878
constructor(public http: HttpClient) {}
7979

8080
ping() {
81-
this.http
82-
.get("http://example.com/api/things")
83-
.subscribe(data => console.log(data), err => console.log(err));
81+
this.http.get("http://example.com/api/things").subscribe(
82+
data => console.log(data),
83+
err => console.log(err)
84+
);
8485
}
8586
}
8687
```

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "angular2-jwt",
2+
"name": "@auth0/angular-jwt",
33
"version": "4.0.0",
44
"scripts": {
55
"ng": "ng",

src/app/app.module.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
1-
import { BrowserModule } from '@angular/platform-browser';
2-
import { NgModule } from '@angular/core';
3-
import { AppComponent } from './app.component';
4-
import {JwtModule} from 'angular-jwt';
5-
import {HttpClientModule} from '@angular/common/http';
1+
import { BrowserModule } from "@angular/platform-browser";
2+
import { NgModule } from "@angular/core";
3+
import { AppComponent } from "./app.component";
4+
import { JwtModule } from "angular-jwt";
5+
import { HttpClientModule } from "@angular/common/http";
66

77
export function tokenGetter() {
8-
return 'SOME_TOKEN';
8+
return "SOME_TOKEN";
99
}
1010

11-
1211
@NgModule({
13-
declarations: [
14-
AppComponent
15-
],
12+
declarations: [AppComponent],
1613
imports: [
1714
BrowserModule,
1815
HttpClientModule,
@@ -25,4 +22,4 @@ export function tokenGetter() {
2522
providers: [],
2623
bootstrap: [AppComponent]
2724
})
28-
export class AppModule { }
25+
export class AppModule {}

0 commit comments

Comments
 (0)