Why do I get the following error:
Can't bind to 'data' since it isn't a known property of 'teach-data'.
When trying to:
<teach-data *ngIf="selectedData" [data]="selectedData"></teach-data>
TeachDataComponent
..some imports
export class TeachDataComponent implements OnInit {
public requests;
@Input() data;
constructor(private http: Http, private JwtService:JwtService,
private _service: NotificationsService) {
}
ngOnInit() {
}
*worked in RC.4
*Hapenned after trying to upgrade to Angular 2 RC.5
Make sure you've followed all the steps for migrating to RC 5. In particular, step 2: Create an NgModule. Try importing the teach-data
component and adding it to the "declarations" section of the @NgModule
statement.
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