src/app/app.component.ts
selector | app-root |
styleUrls | ./app.component.css |
templateUrl | ./app.component.html |
Methods |
constructor(auth: AuthService)
|
||||||
Defined in src/app/app.component.ts:9
|
||||||
Parameters :
|
ngOnInit |
ngOnInit()
|
Defined in src/app/app.component.ts:12
|
Returns :
void
|
import { Component, OnInit } from '@angular/core';
import { AuthService } from './auth/auth.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
constructor(private auth: AuthService) {}
ngOnInit() {
// If there is an active session on the
// authorization server, get tokens
this.auth.renewAuth();
}
}
<router-outlet></router-outlet>
./app.component.css