File

src/app/app.component.ts

Implements

OnInit

Metadata

selector app-root
styleUrls ./app.component.css
templateUrl ./app.component.html

Index

Methods

Constructor

constructor(auth: AuthService)
Parameters :
Name Type Optional
auth AuthService No

Methods

ngOnInit
ngOnInit()
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

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""