Тёмный
No video :(

Angular Authentication: Custom Structural Directive 

Code Shots With Profanis
Подписаться 8 тыс.
Просмотров 6 тыс.
50% 1

We use the *ngIf angular structural directive to show/hide content in the template. In this video, we will create an Angular Custom Structural Directive to serve our needs.
✨ Code: github.com/pro...
✨ Angular Structural Directives: angular.io/gui...
******************************************************
Let's connect
******************************************************
Twitter: / prodromouf
LinkedIn: / prodromouf
#angular #structuraldirective #customStructuralDirective #angularCustomStructuralDirective #directive #angularDirective #angulartutorial

Опубликовано:

 

26 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 25   
@markgoho
@markgoho 2 года назад
Really awesome video, Profanis. I think it's worth mentioning that the role string could be made a little safer if it were a type string literal or enum value.
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 года назад
Yeap! That's a great addition. Thanks for pointing this out!
@salmalakhlifi1901
@salmalakhlifi1901 Год назад
Thank you for this useful playlist, you deserve more views
@CodeShotsWithProfanis
@CodeShotsWithProfanis Год назад
Glad you liked it and thanks for your warm feedback!
@MikeyCoree
@MikeyCoree Год назад
Awesome video! If someone is beginner and looks at this video and gets the error "Type 'boolean | undefined' is not assignable to type 'boolean'. Type 'undefined' is not assignable to type 'boolean'." for the hasRole() method just use '|| false' after it, like this: hasRole(role: string): boolean { return this.userRole?.role.includes(role) || false; }
@triloksingh8596
@triloksingh8596 Год назад
Lovely. Please make video on unit testing and state management.
@CodeShotsWithProfanis
@CodeShotsWithProfanis Год назад
I think you will like this ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE--lSCS8W1Iic.html
@Mohamed00271
@Mohamed00271 Год назад
Very Awesome
@CodeShotsWithProfanis
@CodeShotsWithProfanis Год назад
Thanks :) Glad you liked it!
@TheOfficialSuncrown
@TheOfficialSuncrown 2 года назад
Brilliant!
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 года назад
Thank you!
@serik3818
@serik3818 2 года назад
Wonderful job 👍
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 года назад
Thanks for your feedback and glad you liked it!!
@mouadmahfoud2782
@mouadmahfoud2782 2 года назад
awesome video, thank you
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 года назад
Thanks for your feedback and glad you liked it! :)
@betsegawlemmaamersho1638
@betsegawlemmaamersho1638 2 года назад
thanks
@jankokrsmanovic2131
@jankokrsmanovic2131 Год назад
respect bro
@CodeShotsWithProfanis
@CodeShotsWithProfanis Год назад
Glad you liked it ;)
@henio891
@henio891 2 года назад
Clearly and easy explained. Good one. Do you plan to make video about handling errors?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 2 года назад
Thanks for the feedback! Well, I didn't have in mind to create a video for error handling, but I just added it in my TODO list :)
@henio891
@henio891 2 года назад
@@CodeShotsWithProfanis i Think it would be great to add little explenation to that, and maybe add some error page when user is not authorized.
@aram5642
@aram5642 6 месяцев назад
How safe is this approach, or: how easy/difficult it'd be for someone to fiddle with the logic in devtools and see parts of the template they are not entitled to see?
@CodeShotsWithProfanis
@CodeShotsWithProfanis 6 месяцев назад
If what we are about to hide is sensitive enough, then I would prefer not to have any related data in the storage, but instead have that in the memory.
@AgeCreationTutorials
@AgeCreationTutorials Год назад
Thank you very much for this great series! Is it possible to modify this code so that the DOM element automatically updates (shows/hides) once the underlying roles have changed? Right now I always have to manually refresh the page to reflect changes in the underlying roles.
@CodeShotsWithProfanis
@CodeShotsWithProfanis Год назад
You mean that a role could be a variable which could be changed from admin to user, and you want the content to show/hide according to that?
Далее
Angular Scroll Position Restoration
15:21
Просмотров 6 тыс.
WILL IT BURST?
00:31
Просмотров 25 млн
ЛОВИМ НОВЫХ МОНСТРОВ В LETHAL COMPANY
2:42:22
Get to Know Signal Queries in Angular 17
17:43
Просмотров 1,7 тыс.
Learn RxJS Error Handling in Angular
9:25
Просмотров 5 тыс.
Local Change Detection in Angular is easy with Signals
10:40
WILL IT BURST?
00:31
Просмотров 25 млн