Skip to main content

Posts

Showing posts with the label How to Redirect Page after Logout in Angular 4/5?

How to Redirect Page after Logout in Angular 4/5?

You can redirect the customer to login page when logout the apps. ü   Stayed Informed – Angular 4 and Angular 5 Tutorials Example looks like – import { Injectable } from '@angular/core' ; import { Router } from '@angular/router' ; @ Injectable () export class AuthService {     constructor ( private router : Router ){}     authSignOut (){         localStorage . removeItem ( 'Customer' );         localStorage . removeItem ( '_AuthToken' );         this . router . navigate ([ 'Login' ]);     } } I hope you are enjoying with this post! Please share with you friends. Thank you!!