2016-08-14 52 views
5

爲什麼我會收到以下錯誤: Can't bind to 'data' since it isn't a known property of 'teach-data'.不能綁定到「數據」,因爲它不是「教數據」的已知財產

試圖當:

<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() { 

    } 

*曾在RC.4

* Hapenned嘗試後升級到Angular 2 RC.5。

+0

請發佈您的教數據指令的定義。 – Lucio

+0

''? – lexith

+0

@lexith sry我只是試圖在這裏簡化我的代碼,編輯 – TheUnreal

回答

相關問題