what is
differences between Angular 2 components vs. directives
In angular 2 component is special type of directives that have a view whereas directive is a decorator
which have no views.
component is used to break up the application into smaller components whereas directive is used to
design reusable component.
Component can be used to define pipe whereas directive never use to define pipe.
Components can be present per DOM element. Whereas, Directive is used to add behavior to an existing DOM element.
No comments:
Post a Comment