I'm practicing angular2 and i'm really new in it. I built 2 components - a parent and its child. When i'm trying to pass to some parameter from the parent component to its child, I get 'Error: Input is not defined'. Could someone help me with it, because I'm not able to see what i'm doing wrong.
export class SquadComponent{
@Input() selectedteam;
}
my plunker
Just import Input
before use of it like this
import { Component, Input } from 'angular2/core'
Working example http://plnkr.co/edit/ZXI8FwfYvrcAkTxtUPNy?p=preview
import { Component, Input } from '@angular/core'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With