Gagan BNgagan-bn.hashnode.dev·Mar 19, 2024Angular's DirectiveUnderstanding Angular Directives In Angular, directives are essential tools for adding extra functionality to elements. They are implemented using the @Directive decorator. For instance, Angular provides built-in directives like ngIf for conditionall...DiscussAngular
Arpita Priyadarshini Sahoosahoo.hashnode.dev·Mar 17, 2024Show Truncated tooltip in <@angular/>In UI development we come across such things like not to show tooltip/title when the text is completely showing. We can solve this problem by assigning classes to each text content and that would be so much hectic. In angular we use Directive for sol...Discuss·29 readstext truncate in angular
brian treesebriantreese.hashnode.dev·Sep 1, 20234 Ways to Dynamically Add Classes in AngularHey there, have you ever needed to programmatically add a class to an element in an Angular application? Like, maybe when a button is disabled, we need a class, but then once it’s enabled, we don’t. Or how about when a form goes from an invalid state...Discussangular classes
Dany ParedesProwww.danywalls.com·Apr 13, 2023How to get and use ng-template, ng-container and ng-contentWhen I started to play with templates and dynamic content in angular, I get surprised by multiple directives in angular to work with it ng-template, ng-container, and ng-content. Each one is pretty similar initially; each has exceptional use cases an...Discuss·4 likes·7.2K readsAngularAngular
Gassai Hamzapotatoes.hashnode.dev·Jan 17, 2023How I created a directive in Angular that renders components only if user is authorized?Recently, I was working on an Angular project where certain components were public meaning that everyone should see them and others should be rendered only if the user is authenticated or have a specific role, so I was doing something like this: <!--...Discuss·4 likes·128 readsAngular