WATCH NEXT: Angular with NgRx - Building Angular Project From Scratch - kzbin.info/www/bejne/rJTJi2N7htWMiqMsi=BptT7eqgflHIoQiQ
@kurtkhalidisrael15102 жыл бұрын
Thank you very much, I'm a beginner with angular and this helped with my particular use case in my own project! I wish there were more content like this with angular that's freely available.
@MonsterlessonsAcademy2 жыл бұрын
Glad it helped!
@amarjitaliaskaransharma77244 ай бұрын
thank u, I was stuck in these problem upto 2weeks also my senior didn't solved my problems. I hope u making more content like that. Again, Thanks
@MonsterlessonsAcademy4 ай бұрын
Glad it helped!
@sergeypugach66872 жыл бұрын
Great video, it would be nice to have more content like this with Angular
@MonsterlessonsAcademy2 жыл бұрын
Thank you!
@luczztem Жыл бұрын
and again you are my hero! thank you so much bro after 2 days searching for anything that worked for what I needed, this was the only solution! thanks a lot!!!
@MonsterlessonsAcademy Жыл бұрын
You are welcome!
@danielmathers24834 ай бұрын
Great work. Works perfectly.
@MonsterlessonsAcademy4 ай бұрын
Glad to hear that
@tuku_mann4 ай бұрын
Thank you so much, Oleksandr! You helped me a lot)
@MonsterlessonsAcademy4 ай бұрын
Glad to hear that!
@denisvaraksin76862 жыл бұрын
Thank you for your tutorial, clean RxJS usage on this one!
@MonsterlessonsAcademy2 жыл бұрын
You are welcome!
@anasking Жыл бұрын
thank u so much buddy i was stuck on this for a week
@MonsterlessonsAcademy Жыл бұрын
You are welcome!
@ChutinunBellTantasathiar Жыл бұрын
thank you very much, great video for angular for beginner
@MonsterlessonsAcademy Жыл бұрын
You are welcome!
@viacheslavpak23942 жыл бұрын
this video is a MUST to watch! thank you
@MonsterlessonsAcademy2 жыл бұрын
Thank you!
@egonknapen40792 жыл бұрын
I like your version with fromEvent. The biggest problem I do however have, with this idea, is that if you have, say like 100 elements with clickoutside directives on your page, all those 100 elements will be triggered when you click somewhere. So shouldn't you somehow, disable that subscription and only check, when the menu is opened?
@MonsterlessonsAcademy2 жыл бұрын
That's a valid point. If you know in advance that you have 100 elements I would register 1 listener on body and do checks and not register it in every element.
@nosbookstv93262 жыл бұрын
Thanks for that comment, did not think about that before reading your comment, i subscribe only when its open and unsubscribe when close menu or when its destroy and removed afterviewinit. In that way there are no subscription if menu are closed
@MonsterlessonsAcademy2 жыл бұрын
@@nosbookstv9326 Sure you can also do that. Depends on your usecase.
@sumitghewade20022 жыл бұрын
This video really helped me a lot.
@MonsterlessonsAcademy2 жыл бұрын
Glad to hear that!
@maneshipocrates4 күн бұрын
Thanks. Can someone use this in a navbar with mutiple dropdown menus in TailwindCSS/Angular? Are there any overhead associated with that?
@MonsterlessonsAcademy4 күн бұрын
No if you unsubscribe
@maneshipocrates4 күн бұрын
@@MonsterlessonsAcademy Thanks again. I will see how I can use it. But if you unsubscribe, will it take care of unsubscribing the subscription? Especially if I also want any drop down menu to close if I click outside too.
@naveenpisher69282 жыл бұрын
Very helpfull content, Thank you so much for doing this. Really Appreciated Sir.
@MonsterlessonsAcademy2 жыл бұрын
Glad it was helpful!
@foo32682 жыл бұрын
you're saving lives mate
@MonsterlessonsAcademy2 жыл бұрын
Well, not literally :D
@automobilitv Жыл бұрын
Thank you very much for this tutorial.
@MonsterlessonsAcademy Жыл бұрын
You are welcome!
@raphaelrodriguescoelho93752 жыл бұрын
Thanks very much for this video! That really help me today at work :)
@MonsterlessonsAcademy2 жыл бұрын
Great to hear!
@mayronalves78882 жыл бұрын
TU ME SALVOU DEMAIS, OBRIGADOOOO
@shanmugakamaleshm4254 Жыл бұрын
Thanks dude ❤
@MonsterlessonsAcademy Жыл бұрын
No problem 👍
@federicobalboa9145 Жыл бұрын
you're the boss! thanks
@MonsterlessonsAcademy Жыл бұрын
You are welcome!
@sridevisridevi3858 Жыл бұрын
Thank you ✨💫
@MonsterlessonsAcademy Жыл бұрын
No problem 😊
@pepikkk10 Жыл бұрын
Thank you SO much!
@MonsterlessonsAcademy Жыл бұрын
You're welcome!
@SunnyVakil2 жыл бұрын
Helpful video, thank you !
@MonsterlessonsAcademy2 жыл бұрын
You're welcome!
@onlydev40992 жыл бұрын
thanks you helped me a lot
@MonsterlessonsAcademy2 жыл бұрын
Glad I could help!
@guillermosandoval8416 Жыл бұрын
Thanks a lot!!!
@MonsterlessonsAcademy Жыл бұрын
You're welcome!
@SusantaMuduli2 жыл бұрын
Sir, if I used same drop-down in more than two times means I want more drop down in same page then this outside click directive is not working
@VinayKrishna-l7z Жыл бұрын
Thanks
@MonsterlessonsAcademy Жыл бұрын
Welcome
@andreifilimonchyk83182 жыл бұрын
Thanks. the problem is solved!
@MonsterlessonsAcademy2 жыл бұрын
Awesome!
@SilviuIT-tn3dn Жыл бұрын
are you working on creating and uploading a course in Angular on Udemy?
@MonsterlessonsAcademy Жыл бұрын
No because my Angular course is updated and is already there on Udemy www.udemy.com/course/angular-and-ngrx-building-real-project-from-scratch/
@SilviuIT-tn3dn Жыл бұрын
Thx for reply. I didn't saw it. I just enrolled on it now @@MonsterlessonsAcademy
@SilviuIT-tn3dn Жыл бұрын
i also don't understand why Udemy is so dumb. I found your username, i was expecting when i click your profile to see all your courses posted, but i only see a description...@@MonsterlessonsAcademy
@SuperHaubi2 жыл бұрын
great video, thanks a lot -- i'd also have one question: within the dropdown i have some buttons with click events like
@MonsterlessonsAcademy2 жыл бұрын
You need to use stopPropagation to prevent bubbling an event.
@studentlearninginformatic40972 жыл бұрын
wich theme is used for writing code ?
@MonsterlessonsAcademy2 жыл бұрын
It's gruvbox. Here is a video about an editor. kzbin.info/www/bejne/j6Ovmqidec12q80
@PrashantSingh-lb1xh2 жыл бұрын
Thank you so much, It helped a lot.
@MonsterlessonsAcademy2 жыл бұрын
Glad it helped!
@drorhandler13162 жыл бұрын
First thank you for the video, i'm getting deprecated on the event that the method filter is getting, how can i fix it?
@MonsterlessonsAcademy2 жыл бұрын
You have a wrong import. It should come from rxjs not from rxjs/operators
@gabriel_reguera Жыл бұрын
What to do when I use a dropdown with position absolute? it does not work
@gabriel_reguera Жыл бұрын
forget it, I was using pointer-events: none, that's why it didn't work 😅
@MonsterlessonsAcademy Жыл бұрын
Glad you fixed that!
@alaakhalila90222 жыл бұрын
What about host listener?
@MonsterlessonsAcademy2 жыл бұрын
Host listener is an imperative example of doing things which doesn't fit good in Angular RxJS concepts. I recommend to do everything in streams/rxjs way as then it is easier to combine and apply different logic.
@martin-dw2 жыл бұрын
I have problem. I try this but is not working, the styles are in the global CSS, the directive is on the app folder and the directive is the same of yours but it doesnt work. I dont know exactly why this isn't working, can you please give me some advice or a clue that what could be the problem?
@martin-dw2 жыл бұрын
I found out the problem. It was i wrote capitalazed 'ClickOutside"
@MonsterlessonsAcademy2 жыл бұрын
Awesome!
@TechAdiViews2 жыл бұрын
nice video, one doubt I have, what if we have multiple main menu, then if you click any menu all are showing simultaneously. can you plz send me the code?
@sudhakargajja44962 жыл бұрын
For me also same doubt sir Can you please help
@MonsterlessonsAcademy2 жыл бұрын
If you have several menus you need several isOpened states then for every menu.
@TechAdiViews2 жыл бұрын
@@MonsterlessonsAcademy yes right but I want dynamically state will change, like when i click on one menu then previous menu state will remove and add it to current mene?
@MonsterlessonsAcademy2 жыл бұрын
@@TechAdiViews you set 1 property to false and other to true.
@sudhakargajja44962 жыл бұрын
Hello sir Can you please give code or explanation for ngx-owl-carousal
@PLXris10 ай бұрын
Unfortunately it does not work for me on Angular 17
@RobG76 Жыл бұрын
filter(event) is deprecated
@MonsterlessonsAcademy Жыл бұрын
Filter is not deprecated. Please use the correct import. rxjs.dev/api/index/function/filter
@robertparker36082 жыл бұрын
:thumbs up
@vilzor2 жыл бұрын
Doing that manual unsubscription seems heavy to me. I would make a BaseComponent that implements OnDestroy having a var of smth ngUnsubscribe: Subject. In that BaseComponent ngOnDestroy function write 2 lines: this.ngUnsubscribe.next() and this.ngUnsubscribe.complete(). Now when developing components extend that BaseComponent and each subscription that needs to be destroyed have a pipe of ...pipe(takeUntil(this.ngUnsubscribe)). Now all of your subscriptions are killed when your component get's destroyed. No more headache of memory leak via subscriptions :)
@MonsterlessonsAcademy2 жыл бұрын
This is exactlly what I do in real projects but I don't want to make tutorials more complicated with additional things.
@jaysizmir94322 жыл бұрын
@@MonsterlessonsAcademy Personnally i prefer real projects things. Even if it seems complicated i don't mind !
@egonknapen40792 жыл бұрын
It can be done even much simpler: subs: Subscription = new Subscription(); subs.add(.....subscribe(....); subs.add(.....subscribe(....); subs.add(.....subscribe(....); subs.add(.....subscribe(....); and now just call this.subs.unsubscribe(); in your base class ngOnDestroy() and all 4 are unsubscribed..
@sudhakargajja44962 жыл бұрын
For me it's showing error at this.documentClickSubscription?. unsubscribe (); Showing that expected ":" at above line in my project
@MonsterlessonsAcademy2 жыл бұрын
You can take a source code from the description and compare with yours to find a typo.
@sudhakargajja44962 жыл бұрын
@@MonsterlessonsAcademy actually I have used that only previously
@MrShevrin2 жыл бұрын
greatable thanx for your channel! remark - this way doesn't work for elemnts if their parent have ViewEncapsulation.ShadowDom