Scopes and their inheritance is something you will frequently be dealing with in AngularJS applications. This is especially true in the context of directives, as they are subject to the scopes they are inserted into and, therefore, require careful management in order to prevent unexpected functionalities. Fortunately, AngularJS directives afford several robust tools that help […]
We can create custom directives whenever the built-in directives don’t meet our needs, when we want create reusable functionality. So, in this post I’ll explain how to create simple custom directives.
Filters are created by the Module.filter method, which takes two arguments: the name of the filter that will be created and a factory function that creates the worker function that will undertake the actual work. For example The filter is called labelCase and it formats string so that only the first letter is capitalized. Later, […]
The AngularJS support for form validation is based on directives that replace the standard HTML elements like form and input. You don’t have to do anything to use the directives for form elements. AngularJS applies them automatically when it encounters form, input, select, and textarea elements. The directives provide AngularJS features for forms seamlessly, and […]
The ng-controller directive can nested in HTML elements to create an effect known as controller inheritance. This is a feature that aims to reduce code duplication by letting you define common functionality in a parent controller and use it in one or more child controllers.