2017-01-29 3 views
2

Ich habe einfach Ion-select in Vorlage alsionische 2 ngFor auf Ionen Option werfen Fehler

<ion-select class="pull-right" [(ngModel)]="selectedLanguage"> 
    <ion-option *ngFor="lang of languages" [value]="lang.name">{{lang.name}}</ion-option> 
</ion-select> 

Aber seine Wurffehler:

Unhandled Promise rejection: Template parse errors: Can't bind to 'ngFor' since it isn't a known property of 'ion-option'. 1. If 'ion-option' is an Angular component and it has 'ngFor' input, then verify that it is part of this module. 2. If 'ion-option' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("0>

jemand Ahnung, was mit dem Code ist falsch?

Antwort

3

let Schlüsselwort fehlt, wie unten,

+1

Dank

*ngFor="let lang of languages" 
gezeigt! Es funktioniert jetzt – Amal