The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Pass Values into Angular 2 Components with @Input

Pass Values into Angular 2 Components with @Input

1:59
@Input allows you to pass data into your controller and templates through html and defining custom properties. This allows you to easily reuse components and have them display different values for each instance of the renderer.
Watch this lesson now
Avatar
egghead.io

@Input allows you to pass data into your controller and templates through html and defining custom properties. This allows you to easily reuse components, such as item renderers, and have them display different values for each instance of the renderer.

Avatar
Matt

I've been watching the videos, and up to this point, Angular 2 seems ok, and TypeScript brings some order. Now when I see more of the funky annotations interspersed in the html template, though, I'm not sure how to explain it, but that type of markup just does not feel right. The Angular team has turned HTML into a soup of cryptic symbols.

I suppose that since you have played so much with Angular 2, you have grown comfortable with the syntax and now like it? Or do you also find it...less than compelling.

I have not investigated Aurelia and Vue, which have an html syntax sharing greater similarity with Angular 1 than Angular 2. This might be sufficient motivation. (Hint: egghead should do some vue.js and aurelia videos!)

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?