AngularJS directives are used to extend HTML. These are special attributes starting with ng- prefix. We're going to discuss following directives −
Filters are used to change modify the data and can be clubbed in expression or directives using pipe character. Following is the list of commonly used filters.
AngularJS supports modular approach. Modules are used to separate logics say services, controllers, application etc. and keep the code clean. We define modules in separate js files and name them as per the module.js file. In this example we're going to create two modules.
You can add AngularJS event listeners to your HTML elements by using one or more directives. The event directives allows us to run AngularJS functions at certain user events.An AngularJS event will not overwrite an HTML event, both events will be executed.
AngularJS has directives for binding application data to the attributes of HTML DOM elements.
Forms in AngularJS provides data-binding and validation of input controls.We can use ng-click to handle AngularJS click on button and use $dirty and $invalid flags to do the validations in seamless way. Use no validate with a form declaration to disable any browser specific validation. Forms controls makes heavy use of Angular events.
AngularJS offers client-side form validation. AngularJS monitors the state of the form and input fields (input, textarea, select), and lets you notify the user about the current state.AngularJS also holds information about whether they have been touched, or modified, or not.You can use standard HTML5 attributes to validate input, or you can make your own validation functions.Client-side validation cannot alone secure user input. Server side validation is also necessary.
Industry professionals as Trainers