2017-12-18 12 views
0

웹 서비스에서 데이터를 가져오고 HTML 페이지에서이 데이터를 렌더링하고 싶습니다. 내가 데이터를 통해 루프 *ngfor를 사용템플릿 구문 분석 오류 -> 'ion-item'의 알려진 속성이 아니기 때문에 'ngforOf'에 바인딩 할 수 없습니다.

<ion-list> 
    <ion-item *ngfor="let item of items"> 
     {{item.Problem}} 
    </ion-item> 
</ion-list> 

하지만이 반환 :

Uncaught Error: Template parse errors: 
Can't bind to 'ngforOf' since it isn't a known property of 'ion-item'. 
1. If 'ion-item' is an Angular component and it has 'ngforOf' input, then verify that it is part of this module. 
2. If 'ion-item' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. 
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. (" 
    <ion-list> 

     <ion-item [ERROR ->]*ngfor="let item of items"> 

      {{item.Problem}} 
"): ng:///AppModule/[email protected]:18 
Property binding ngforOf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". (" 
    <ion-list> 

     [ERROR ->]<ion-item *ngfor="let item of items"> 

      {{item.Problem}} 
"): ng:///AppModule/[email protected]:8 

내가 이미 ngfor 구문을 체크하는 방법이 문제를 해결하려면?

답변

1

해야 *ngFor

<ion-item *ngFor="let item of items">