import { Component, OnInit } from '@angular/core';

import { RoutingService } from './../shared/routing/routing.service';
import { SessionService } from './../shared/session/session.service';

@Component({
    selector: 'ts-logout',
    template: ''
})
export class LogoutComponent implements OnInit {

    constructor(
        private routingService: RoutingService,
        private sessionService: SessionService
    ) { }

    ngOnInit(): void {
        this.sessionService.clean();
        this.routingService.toLogin();
    }

}
import { Component, OnInit } from '@angular/core';

import { RoutingService } from './../shared/routing/routing.service';

@Component({
    selector: 'ts-logout',
    template: ''
})
export class LogoutComponent implements OnInit {

    constructor(
        private routingService: RoutingService
    ) { }

    ngOnInit(): void {
        console.log('TODO: really logout');
        this.routingService.toLogin();
    }

}
--- 
+++ 
@@ -1,6 +1,7 @@
 import { Component, OnInit } from '@angular/core';
 
 import { RoutingService } from './../shared/routing/routing.service';
+import { SessionService } from './../shared/session/session.service';
 
 @Component({
     selector: 'ts-logout',
@@ -9,11 +10,12 @@
 export class LogoutComponent implements OnInit {
 
     constructor(
-        private routingService: RoutingService
+        private routingService: RoutingService,
+        private sessionService: SessionService
     ) { }
 
     ngOnInit(): void {
-        console.log('TODO: really logout');
+        this.sessionService.clean();
         this.routingService.toLogin();
     }
 
Clean session data when logout
