- 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.
Who do you think would benefit most from this? Developing a zippy component in Angular 2 > https://t.co/NKKzFl84cA
— AngularJS News (@AngularJS_News) July 27, 2017
Tweets by pkozlowski_os
Tweets by vberchet
Tweets by mhevery
Tweets by PascalPrecht
Tweets by timche_
Tweets by tim_hartmann_