Directives In Angular
* Directives in angular manipulates DOM,
By using directives behavior, layout and appearance of DOM elements can be measured.
* Directives are like
components in angular, which is a core building block of angular.
Why Directive Is Needed
* In angular framework,
it ensures re-usability of UI components. With help of this it can develop multi
sub-components to be used throughout the application.
* The below 3 are the main reasons to have directive in angular:
Reusability: One of the strongest principles of any program that it’s component must
extent it’s re usability, so that it can be re used multi time in a large-scale
application.
Readability: Directive provides much more readability to developers to understand an
application’s functionality and data flow.
Maintainability: One of the main
aspects of having directive is maintainability. It can be easily decoupled and
replace with a new one.
Directive vs
Component
No comments:
Post a Comment