Ionic2 - 无法在'Element'上执行'setAttribute':'[[ngModel]]'不是有效的属性名称

Isa*_*lle 3 ionic-framework ionic2

我正在尝试将选项列表动态加载到选择输入中.我得到的错误如下:

Error in ./PhonePage class PhonePage - caused by: Failed to execute 'setAttribute' on 'Element': '[[ngModel]]' is not a valid attribute name.
Run Code Online (Sandbox Code Playgroud)

这是我的phone.ts代码

@Component({
selector: 'page-phone',
templateUrl: 'phone.html'
})

export class PhonePage {

selectedValue: number;
optionList: Array<{value:number, text: string}> = [];

constructor(public navCtrl: NavController, public navParams: NavParams) {

    this.navCtrl = navCtrl
    this.initOptionList();

}

moveToEmail(){

    this.navCtrl.push(EmailPage)
}

initOptionList(){
    this.optionList.push({value: 1,text:"FR +33"});
    this.optionList.push({value: 1,text:"BE +32"});
    this.optionList.push({value: 1,text:"LU +352"});
    this.optionList.push({value: 1,text:"CH +41"});
    this.optionList.push({value: 1,text:"GB +44"});
    this.optionList.push({value: 1,text:"IE +353"});
    this.optionList.push({value: 1,text:"NL +31"});
    this.optionList.push({value: 1,text:"ES +34"});
    this.optionList.push({value: 1,text:"PT +351"});
    this.optionList.push({value: 1,text:"IT +39"});
    this.optionList.push({value: 1,text:"DE +49"});
    this.optionList.push({value: 1,text:"DK +45"});
    this.optionList.push({value: 1,text:"MT +356"});
    this.optionList.push({value: 1,text:"GP +590"});
    this.optionList.push({value: 1,text:"GF +594"});
    this.optionList.push({value: 1,text:"MQ +596"});
    this.optionList.push({value: 1,text:"YT +262"});
    this.optionList.push({value: 1,text:"NC +687"});
    this.optionList.push({value: 1,text:"PF +689"});
    this.optionList.push({value: 1,text:"RE +262"});
    }
}
Run Code Online (Sandbox Code Playgroud)

这是我正在尝试循环的html页面的代码.我在数组中推送选项.

<ion-select [[ngModel]]="selectedValue">
    <ion-option *ngFor="let item of optionList" value="{{item.value}}">{{item.text}}</ion-option>
</ion-select>
Run Code Online (Sandbox Code Playgroud)

Pre*_*ari 7

在声明ngModel[(ngModel)]="selectedValue"括号(括号内)时,必须声明为[[ngModel]]="selectedValue"(括号内的括号).