Angular project in Hindi #8 Auth Guard for Seller SignUp | Angular E-commerce Project

  Рет қаралды 51,635

Code Step By Step

Code Step By Step

Күн бұрын

Inst id: @code.steps
This is the Angular project tutorial series and here we learn how to apply auth guard in Angular project an E-commerce project with simple steps this is a perfect project course for beginners.
Learn how to make navbar and header in angular project step by step
Auth Guard for Seller
Make Auth Gaurd
Apply Gaurd on Seller Route?
Add Data in LocalStorage?
Add Auth Gaurd on Page Refresh?
Project for
angular project from scratch
angular project from scratch in Hindi
angular project tutorial in Hindi
angular project tutorial for beginners
angular projects for practice
Angular tutorial tutorial playlist
• Angular 12 - 13 tutori...
Angular Project playlist
• Angular project in Hin...
React js Latest Playlist in Hindi: • React tutorial for beg...
Git repo link : github.com/ani...

Пікірлер: 87
@codestepbystep
@codestepbystep 2 жыл бұрын
Please support me by subscribe, like and comment :) thank you
@alokkumardubey3951
@alokkumardubey3951 2 жыл бұрын
Full support ali, can u please upload 2 vedio daily
@backenddeveloper3086
@backenddeveloper3086 2 жыл бұрын
@@alokkumardubey3951 same request brother
@CodeWithMe-q4l
@CodeWithMe-q4l 2 жыл бұрын
@@backenddeveloper3086 full support
@sandippandya927
@sandippandya927 2 жыл бұрын
Full Support Bade Bhai.........Keep it Up
@ZakriaRao
@ZakriaRao Жыл бұрын
in angular 16 code for guard is changed.
@MaheshYadav-qr2gf
@MaheshYadav-qr2gf 2 жыл бұрын
Bhaiya auth guard , jwt token , http interceptor inhi main doubt tha , or in sabke video bhi nhi hai , aap ke iss project se bhut help ho rahi hai , keep it up , Thank you bhaiya !!!!
@AkshitAkash
@AkshitAkash 2 жыл бұрын
This video was a little difficult to understand, too many things were happening at the same time. But trying my best to understand. Thank you sir
@alamshaikh4358
@alamshaikh4358 2 жыл бұрын
After watching this video I feel confident in authentication. Thank you Anil. And one more request Since you start this awesome series you could not be skip any day pls follow this consistency and daily upload one video.
@codestepbystep
@codestepbystep 2 жыл бұрын
Sure 😊
@dailyvlogwithshubhi
@dailyvlogwithshubhi 6 ай бұрын
Thank you, this is really helpful for gaining some practicle knowledge
@venugopal-mm4ui
@venugopal-mm4ui 2 жыл бұрын
Thank you very much for sharing complete project creation as a playlist , learned many new things .
@mrankushtechnical
@mrankushtechnical Жыл бұрын
13:27 why are u redirecting here not in the authguard because the value checking is inside the auth guard ?
@CodeWithMe-q4l
@CodeWithMe-q4l 2 жыл бұрын
thanks for making angular project video really you are the life saver
@gayathrigayu7987
@gayathrigayu7987 Жыл бұрын
Thank you, you have did great help to understand the working of project basics and intermediate concepts
@backenddeveloper3086
@backenddeveloper3086 2 жыл бұрын
Sir plzz video thoda bada bano... Aur kam days mai complete karo.. Ur teaching art is very good..
@dipalibidave6623
@dipalibidave6623 2 жыл бұрын
helllo sir,kya aap rxjs me tutorial bna sakte hai ,aap jis prakar explain krte ki bhot easyly understand ho jata hai..
@Shahzad-f3o
@Shahzad-f3o Жыл бұрын
plz update auth gurad part plz because angar 16 guard cgange and smgh nh arhi kih new gurd me kaisy isloggedin ko implement krna Plzz
@muhammadnaveed7953
@muhammadnaveed7953 2 жыл бұрын
Thank you Sir g..
@mohammadmuzmilkabir3067
@mohammadmuzmilkabir3067 2 жыл бұрын
After this angular ecommerce project Please make a MERN project like the way developers do project in companies please 🙏
@swetangle
@swetangle 2 жыл бұрын
hello sir, i have 1 question , i did same as you, but my seller-auth page not coming after using auth guard
@ashwiniwaghmode515
@ashwiniwaghmode515 Жыл бұрын
Hello sir when i create auth guard we got different code usme constructor create krne baad error aa raha hai bow to solve this error
@samchaudhry2937
@samchaudhry2937 Жыл бұрын
did you fine the solution ?
@nice.hemant
@nice.hemant Жыл бұрын
ye jo aap code likh rahe hai (timing 11:50) kaise pata ki ye sab code likhna hai? apka previous Angular ka series maine dekha hai sara.
@StunningRajput
@StunningRajput Жыл бұрын
sir ap boht ghuma k or boht lamba procces bata rahy hain please zara jaldi or short main batayn direct point ki bat
@shubhampatil12345
@shubhampatil12345 Жыл бұрын
Error in 13:00 for angular 16 ADD following code to seller.auth.ts file import { inject } from '@angular/core'; import { CanActivateFn } from '@angular/router'; import { SellerService } from './services/seller.service'; export const authGuard: CanActivateFn = (route, state) => { let service = inject(SellerService) if(localStorage.getItem('seller')){ return false; } return service.isSellerLoggedIn; };
@simplesolutionshub
@simplesolutionshub 2 жыл бұрын
Instead of storing the user data in local storage, won't it be better to keep it in session storage?
@kmahendra6691
@kmahendra6691 Жыл бұрын
now inside the auth gurad code has changed so i am facing difficultly to implement the code please help me this is the code- import { CanActivateFn } from '@angular/router'; export const authGuard: CanActivateFn = (route, state) => { return true; };
@AyushSrivastava-qp1mw
@AyushSrivastava-qp1mw Жыл бұрын
yes u r right my question is also same have ou get the solution of this
@kmahendra6691
@kmahendra6691 Жыл бұрын
no bro @@AyushSrivastava-qp1mw
@aishwarya7298
@aishwarya7298 Жыл бұрын
​@@okconnect i tried the same, but it is giving an error, Boolean is not assignable to type boolean
@Anurag_Singh8299
@Anurag_Singh8299 Жыл бұрын
Mera b same error aa rha h bhai
@GazalCharaya
@GazalCharaya Жыл бұрын
import { CanActivateFn } from '@angular/router'; import { SellerService } from './services/seller.service'; import { inject } from '@angular/core'; export const authGuard: CanActivateFn = (route, state) => { const sellerService = inject(SellerService); if(localStorage.getItem('seller')){ return true; } return sellerService.isSellerLoggedIn; }
@mdsameershah6251
@mdsameershah6251 9 ай бұрын
hello sir this video is little bit difficult i don't understand it properly in anuth gurth or reload function plz make a new video in auth guard in angular 17
@FarhanKhan-dl5yk
@FarhanKhan-dl5yk Жыл бұрын
export class AuthGuard implements CanActivate { showing error CanActivate' is deprecated.ts(6385) index.d.ts(302, 4): The declaration was marked as deprecated here.
@ShrishDollin
@ShrishDollin Жыл бұрын
did you find a solution? I am also stuck with that :(
@AyushSrivastava-qp1mw
@AyushSrivastava-qp1mw Жыл бұрын
@@ShrishDollin mee too
@harshjain3877
@harshjain3877 Жыл бұрын
I am also stuck in same problem
@Anurag_Singh8299
@Anurag_Singh8299 Жыл бұрын
Same bro 😊
@ChillOutinLove
@ChillOutinLove Жыл бұрын
export const sellorAuthGuard: CanActivateFn = (route, state) => { const sellorService =inject(SellorServiceService); return sellorService.isSellorLoggedIn; }; use inject method instead of constructor
@ashudestro5424
@ashudestro5424 Жыл бұрын
After getting logged in it is showing the seller-home works but how to logout that seller whenever i m clicking it is showing me same seller - home works not getting seller signup page.
@imranali-kn6mv
@imranali-kn6mv 2 жыл бұрын
Please start the project for MEAN stack developer because I am having lot of confusion and don't know how to work with MEAN combined please help us Anil sir ji
@coderandsinger
@coderandsinger 2 жыл бұрын
What if, i am not using Authguard, i am applying condition before calling route in my code?
@No-One8166
@No-One8166 Жыл бұрын
why my auth guard file structure is different than yours, like you have "export class implements canActivate'" while i have "export const implements canActivateFn'" . plz answer bcz it shows error
@AnilKumar-ge7us
@AnilKumar-ge7us Жыл бұрын
Bhai koi solution mila
@No-One8166
@No-One8166 Жыл бұрын
@@AnilKumar-ge7us "const sellerService = inject(SellerService);" try to inject the service like this instead of constructor
@AnilKumar-ge7us
@AnilKumar-ge7us Жыл бұрын
Thanks bro
@hahsmi
@hahsmi Жыл бұрын
canActivate not working with Angular 15
@Kislav
@Kislav Жыл бұрын
for first timer need to watch two aor three times to get complete jist because the whole code is not explained with the flow of how the compiler is travelling from one part to another whenever an event is triggered
@vidulgupta5219
@vidulgupta5219 2 жыл бұрын
nice
@codestepbystep
@codestepbystep 2 жыл бұрын
Thanks
@aishwarya7298
@aishwarya7298 Жыл бұрын
Auth guard class has been depricated. Use inject service instead of constructor. Like Const sellerService: SellerService = inject(SellerService) Return seller.isUserLoggedIn; ****Important note: Donot define the type for the BehaviourSubject as< boolean>
@akshaygill4692
@akshaygill4692 Жыл бұрын
Can you send the auth guard code it would be very helpfull
@aishwarya7298
@aishwarya7298 Жыл бұрын
import { Component } from '@angular/core'; import { SellerService } from '../services/seller.service'; import { Router } from '@angular/router'; import { signUp } from '../data-type'; @Component({ selector: 'app-seller-auth', templateUrl: './seller-auth.component.html', styleUrls: ['./seller-auth.component.css'] }) export class SellerAuthComponent { constructor(private seller: SellerService, private router: Router) { } loginUser:boolean=false; authError:string = ''; signUpError:string = ''; ngOnInit(): void { this.seller.reloadAction(); } signUp(data: signUp):void { this.signUpError=""; this.seller.userSignUp(data); this.seller.loginError.subscribe((error)=>{ if(error){ this.signUpError="Enter a correct email address" } }); } login(data: signUp):void{ this.authError=""; this.seller.sellerLogin(data); this.seller.loginError.subscribe((error)=>{ if(error){ this.authError="Email or Password is incorrect!" } }); } openLogin(){ this.loginUser=true; } openSignUp(){ this.loginUser=false; } } @@akshaygill4692
@aishwarya7298
@aishwarya7298 Жыл бұрын
****Important note: Do not define the type for the BehaviourSubject as< boolean>@@akshaygill4692
@Editmaker-wm8td
@Editmaker-wm8td Жыл бұрын
​@@aishwarya7298 can you share your SellerService code..
@artisutar7615
@artisutar7615 9 ай бұрын
Yes it's helpful thanks..
@gauravbisht8487
@gauravbisht8487 Жыл бұрын
bhaiya i spend more than 8 hrs and checked the code but my seller still go to signup page even after the login .. any help would be more than appreciated😊
@samchaudhry2937
@samchaudhry2937 Жыл бұрын
apka authguard ka code same aa raha ha?? mara different aa raha
@RahulRathore-cj3ky
@RahulRathore-cj3ky Жыл бұрын
auth gourd change ho gya h angular ka @@samchaudhry2937
@Anurag_Singh8299
@Anurag_Singh8299 Жыл бұрын
​@@samchaudhry2937mera bhi different aa tha h bhai inki video. M. Alag code aa rha h Or mere m alag code aa rha h auth. Guard. Ts m
@Anurag_Singh8299
@Anurag_Singh8299 Жыл бұрын
Isme error aa rha h kya ap. Muje bta skte h sir.. M isko dekh k project bna rha hu apna its urgent.
@sandippandya927
@sandippandya927 2 жыл бұрын
Bade Bhai .. Ek Mazak Wali bat puchhna thi.... Ye Sam , Bhasker or peter hai kon ?????
@codestepbystep
@codestepbystep 2 жыл бұрын
Haha, sam and bhasker h bro, Peter just a random name
@sandippandya927
@sandippandya927 2 жыл бұрын
Achchha Lga Anil bro apne reply diya... Par sch me apki mehnat dikhiti he .. aap late night tk jaag kr vedios bnate ho... mene abhi kuchh dino se IT join kiya he... Bahut se channel dekhe he coading ke ... par aapki bat alg he .. aap bahut hi simple tarike se smjhate ho.. or personally bhi aap bahut achchhe insan ho.. bcz apki bato se lgta he ki apko, apki knowledge ka ghamannd nahi he or apko khushi milti apki knowledge ko share krke .... Sch me aap jo mehnat krke vedios bnate ho vo tarif krne layak he .... App hm jese beginners ke liye ideal ho bade bhai .... keep it up..... And Thank you so much apki vjh se hm inta kuchh sikh pate he vo bhi inte simple way me ........Aap yakin nahi manenge Anil bro .... Mai apke bahut sare vedios ki link mere what's aap status pe lgata hu... bahut sari vedios ki links IT related groups me bhejta rhta hu.... You are awesome Person ... Thanks a lot Brother....
@codewithfrontenddesign
@codewithfrontenddesign Жыл бұрын
How to Redirect file auth.guard.ts files
@bharath8911
@bharath8911 2 жыл бұрын
I followed all the process you did, but I'm not able to got to the seller-home page after implementing Authguard. Console shows error: ERR_CONNECTION REFUSED
@INSANE_EDITZ651
@INSANE_EDITZ651 Жыл бұрын
seller-servise.ts reloadSeller() { if (localStorage.getItem('seller')) { this.isSellerLoggedIn.next(true); this.router.navigate(['seller-auth']); } (['seller-auth']); not (['seller-home']);
@yaswanthpavankumar6229
@yaswanthpavankumar6229 Жыл бұрын
Hi bro do u know how to solve cors error?
@ankitninave7627
@ankitninave7627 Жыл бұрын
have you got any answer , i am getting error when i am trying to call constructor in authguard @@yaswanthpavankumar6229
@jiyasrivastava-g9v
@jiyasrivastava-g9v 6 ай бұрын
after ng g guard auth can implementing can activate...it is showing...Schematic input does not validate against the Schema: {"name":"auth","project":"ecomm-project2","implements":[]} Errors: Data path "/implements" must NOT have fewer than 1 items....this error pls anybody tell how to solve this issue
@divyanshukoshta2443
@divyanshukoshta2443 5 ай бұрын
bhai solve hui kya yeh
@mrankushtechnical
@mrankushtechnical Жыл бұрын
21:02 kya murkh panti hai , phle hia authguard me kar leta
@BikeWaysChannel
@BikeWaysChannel Жыл бұрын
New Guard how to handel
@ShankarGidaganti
@ShankarGidaganti 2 жыл бұрын
what is behaviorSubject?
@mohdsameer7433
@mohdsameer7433 9 ай бұрын
Daily 2 video Target
@james3132
@james3132 Жыл бұрын
very good tutorial, but I really can't understand your english 😅
@ridoyahmed2964
@ridoyahmed2964 2 жыл бұрын
bro you have any community grups please give me link or make
@codestepbystep
@codestepbystep 2 жыл бұрын
Hi bro. I have Instagram only. Id is code.steps
@tomcruz6733
@tomcruz6733 10 ай бұрын
bro, plz phle practice krr lo fir baad me video banaya karo...... video k bich me kaafi baar confuse rhte ho or hame bhi krte ho
@thetravelblaze
@thetravelblaze 2 жыл бұрын
Please provide github link
@CodeWithMe-q4l
@CodeWithMe-q4l 2 жыл бұрын
I'm sharing your youtube link in twitter, LinkedIn and showcase
@sandippandya927
@sandippandya927 2 жыл бұрын
Thank You on behalf of @Code step by step.......Jo KZbin vedio bnate he bahut mehnt krte h...Inko vastav me support krna chahiye
@ineffable_guy
@ineffable_guy 2 жыл бұрын
Sir please upload the GitHub link in description
Angular project in Hindi #9 Seller Login Form | Angular E-commerce Project
11:04
How Strong is Glass? 💪
00:25
Brianna
Рет қаралды 29 МЛН
Minecraft: Who made MINGLE the best? 🤔 #Shorts
00:34
Twi Shorts
Рет қаралды 46 МЛН
Cute dog Won Squid Game 😱💸 #dog # funny #cartoon
00:33
Wooffey
Рет қаралды 21 МЛН
Authentication in Angular- AuthGuard | CanActivate | Role Auth
12:56
API vs SDK: What’s the Difference?
3:42
Klippa
Рет қаралды 18 М.
Angular  Routing | LazyLoading | AuthGuard | multiple router-outlet |  all in one video
31:37
Technical Babaji (Tarique Akhtar)
Рет қаралды 197 М.
Every React Concept Explained in 12 Minutes
11:53
Code Bootcamp
Рет қаралды 973 М.
Angular Life Cycle Hooks | Lifecycle Hooks | Angular 12+
18:47
How Strong is Glass? 💪
00:25
Brianna
Рет қаралды 29 МЛН