Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't bind to 'data' since it isn't a known property of 'teach-data'

Tags:

angular

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

like image 451
TheUnreal Avatar asked Nov 09 '22 10:11

TheUnreal


1 Answers

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.

like image 167
Michael Venable Avatar answered Nov 15 '22 07:11

Michael Venable