Saturday, February 2, 2019

List the differences between Angular 2 components vs. directives.

No comments
Hi Dear Friends,

In this post We would like to share infinity knowladge My Good experience and Best solution For .

Laravel Examples

 List the differences between Angular 2 components vs. directives.

Apart from components, directives are also used in Angular 2 which allows us to attach behavior to elements in DOM. There are certain differences between the components and directives in Angular 2. They are:
  1. In Angular 2, a component is a directive with a view whereas a directive is a decorator with no view. Components are the specific type of directive that allows us to utilize web component functionality throughout our application. Whereas, Directive is the mechanism by which we attach behavior to elements.
  2. A component is used to break up the application into smaller components. Whereas, Directive is used to design the re-usable components.
  3. Components can be used to define pipes. Whereas, We cannot define pipes using directives.
  4. Components can be present per DOM element. Whereas, Directive is used to add behavior to an existing DOM element.
Try this it will help you and for more information click here: Laravel Examples.

Read :

I hope you like this Post, Please feel free to comment below, your Any Idea, suggestion and problems if you face - I am here to Resolve your Any problems.
We hope it can help you...

No comments :

Post a Comment