Skip to content

Commit

Permalink
add httpclient, request token
Browse files Browse the repository at this point in the history
  • Loading branch information
lor6 committed Jan 15, 2018
1 parent fd46c1f commit 28af016
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { HttpClientModule } from '@angular/common/http';
import { RouterModule } from '@angular/router';
import { OAuthModule } from 'angular-oauth2-oidc';

Expand All @@ -19,6 +20,7 @@ import { FooComponent } from './foo.component';
BrowserModule,
FormsModule,
HttpModule,
HttpClientModule,
OAuthModule.forRoot(),
RouterModule.forRoot([
{ path: '', component: HomeComponent }])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {Injectable} from '@angular/core';
import {Router} from '@angular/router';
import { Cookie } from 'ng2-cookies';
import { Http, Response, Headers, RequestOptions } from '@angular/http';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
Expand All @@ -23,6 +24,7 @@ export class AppService {
this.oauthService.clientId = "sampleClientId";
this.oauthService.scope = "read write foo bar";
this.oauthService.setStorage(sessionStorage);
this.oauthService.oidc=false;
this.oauthService.tryLogin({});
}

Expand Down

0 comments on commit 28af016

Please sign in to comment.