JavaScript Edu Resources. Angular Courses. React Tutorials. Join us!

Developing a zippy component in Angular 2

  • Just recently we’ve built a simple zippy component in Angular and in this article we want to show you how.
  • In order to tell Angular that this particular class is a component, we use something called “Decorators”.
  • In order to do that, we need to do things:

    Angular comes with a module system that allows us to register directives, components, service and many other things in a single place, so we can use them throughout our application.

  • The property defines all directives and pipes that are used in this module and tells Angular, which component should be bootstrapped to run the application.
  • That means, this gets a lot easier in Angular too, because all we need to do is to import the decorator and teach our component about an input property, like this:

    Basically what we’re doing here, is telling Angular that the value of the attribute is projected to the property.



Developing a zippy component in Angular by thoughtram


https://twitter.com/



https://twitter.com/intent/tweet/?text=Developing%20a%20zippy%20component%20in%20Angular&url=http://blog.thoughtram.io/angular/2015/03/27/building-a-zippy-component-in-angular-2.html


Comments are closed, but trackbacks and pingbacks are open.