Skip to content

Commit

Permalink
Fixed package name, updated versions in readme (#635)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Hobbs authored Feb 7, 2020
1 parent 4a7b98e commit 6b90ecb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 17 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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)
);
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "angular2-jwt",
"name": "@auth0/angular-jwt",
"version": "4.0.0",
"scripts": {
"ng": "ng",
Expand Down
19 changes: 8 additions & 11 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -25,4 +22,4 @@ export function tokenGetter() {
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
export class AppModule {}

0 comments on commit 6b90ecb

Please sign in to comment.