Angular custom directives can take inputs using @HostBinding and add event listeners to elements using @HostListener. In this tutorial, we will create a custom directive example from scratch which will take user inputs from a directive element and use them in event listeners. Let’s create a new Directive in the Angular application to demonstrate an
Uploading media files like profile images or PDF or Word documents to the server via a web form is a common practice in data-centric applications. In Angular application where data is sent via HTTP calls, we can easily convert images and docs to the Base64 string and send them to the server is using HTTP
Adding Asterisk to required fields on a form helps the user to quickly identify the required fields. Adding a star(*) is now an industrial standard that is required in almost every data-centric application consuming any kind of data. For lengthy form it becomes a cumbersome job to add star sign to every form of control.
In this tutorial, we will learn how to create custom Directive in Angular Application and re-use them in different components and at different levels of module hierarchy. Sometimes in large Angular applications, we may have a more complex structure of components where some of them may have their own modules and sub-modules or components.
In an Angularjs project, if you are trying to add a datepicker having all features like MinDate MaxDate etc, you will hardly find any module which is performance efficient, bug-free and is requirement friendly like jQuery UI datepicker. So, If you are looking to use jQuery Datepicker as a directive in your AngularJS project, then