Angular - How to resolve CanActivate deprecated in Angular-15 Auth Guard | Nihira Techiees
ฝัง
- เผยแพร่เมื่อ 8 ก.ย. 2024
- #canactivate #angular16 # angular #nihiratechiees
This video ExplainsHow to resolve CanActivate deprecated in Angular-15 Auth Guard
Source code GitHub Link
=========================
github.com/nih...
Join this channel to get access to perks:
/ @nihiratechiees
after searching for hours finally found it,Thank you
Great to hear🤝
After hundred videos, this have been the best!!! Congratulation
Thanks
You were amazing in the explanation!! Thanks!
Thanks
This is just excellent. Thank you so much.
Glad to hear👍
Useful ❤
Thanks🙏
thank you so much
Welcome🤝
Awesome..👍
Thanks🙏
Please 🙏 make a separate Video on JWT token for angular purpose....
Thank you !
Welcome👍
Sweet!
Thanks!
Super sir could you please make video validation they show that username already exists and used MySQL database 🙏🙏
Will do in future currently I have some plan
@@NihiraTechiees thanks I m wait one project with database connection and one again thanks you
Sir I want to learn angular so which Playlist should I follow
th-cam.com/play/PLfyWdpsiUiPAcHftMr_R0HwSyAVHCW5cR.html
I love you
Thanks for showing love 🤝
What if I want to call an api from service to check for authentication.
Follow this video th-cam.com/video/jrp1djz0H6E/w-d-xo.html
export class AuthGuard implements CanActivate{
constructor(private sellerService:SellerService){}
canActivate(
route: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable | Promise| boolean | UrlTree{
//state: RouterStateSnapshot): Observable | Promise {
throw new Error('Method not implemented.');
if(localStorage.getItem('seller')){
return true;
}
return this.sellerService.isSellerLoggedIn;
}
Error:
Uncaught (in promise): TypeError: Class constructor AuthGuard cannot be invoked without 'new'
TypeError: Class constructor AuthGuard cannot be invoked without 'new'
pls solve this bro
Cross check with my source code