{"flag":true,"single":true,"pageTitle":"Angular | Redirect to another page after authentication | Redirect after login","post":{"id":110,"user_id":"3","slug":"angular-redirect-to-another-page-after-authentication-redirect-after-login-65qz","title":"Angular | Redirect to another page after authentication | Redirect after login","body":"<p>use Angular's Router service.<\/p>\r\n<pre class=\"language-markup\"><code>import { Router } from '@angular\/router';<\/code><\/pre>\r\n<pre class=\"language-markup\"><code>constructor ( private authSerivce: AuthenticateService, private router: Router){};<\/code><\/pre>\r\n<p>call the navigate method of the Router service to redirect the user to the desired URL<\/p>\r\n<pre class=\"language-markup\"><code>this.router.navigate(['https:\/\/www.youtube.com\/']);<\/code><\/pre>\r\n<p>&nbsp;<\/p>\r\n<p>&nbsp;<\/p>","category_id":"14","is_private":"0","created_at":"2023-04-08T02:39:07.000000Z","updated_at":"2023-04-08T02:39:07.000000Z","category":{"id":14,"user_id":"3","name":"Angular","slug":"angular-gd2h","parent_id":null,"created_at":"2023-03-28T22:24:44.000000Z","updated_at":"2023-03-28T22:24:44.000000Z"},"user":{"id":3,"name":"Muhammad Farhan","email":"helpinghour@gmail.com","email_verified_at":null,"two_factor_confirmed_at":null,"current_team_id":"3","profile_photo_path":null,"created_at":"2023-03-28T22:23:15.000000Z","updated_at":"2023-03-28T22:24:06.000000Z","profile_photo_url":"https:\/\/ui-avatars.com\/api\/?name=M+F&color=7F9CF5&background=EBF4FF"}},"pageDesc":"use Angular's Router service. import { Router } from '@angular\/router'; constructor ( private authSerivce: AuthenticateService, private rout - Angular | Redirect to another page after authentication | Redirect after login (Updated: April 8, 2023) - Read more about Angular | Redirect to another page after authentication | Redirect after login at my programming site [SITE]","categories":[]}