Android 离子2:如何使用多语言选择离子选择[selectOptions]? {{‘分支’|翻译} {{branch.BranchName}
如何使用selectOptions多语言Android 离子2:如何使用多语言选择离子选择[selectOptions]? {{‘分支’|翻译} {{branch.BranchName},android,ios,ionic2,cross-platform,ionic2-select,Android,Ios,Ionic2,Cross Platform,Ionic2 Select,如何使用selectOptions多语言 不要在html更改中使用这一行 在Typescript中,请使用以下代码: <ion-item> <ion-label >{{ 'branch' | translate }}</ion-label> <ion-select [(ngModel)]="defualtBranch" okText="{{ 'okText' | translate }}" cancelText="{
不要在html更改中使用这一行 在Typescript中,请使用以下代码:
<ion-item>
<ion-label >{{ 'branch' | translate }}</ion-label>
<ion-select [(ngModel)]="defualtBranch"
okText="{{ 'okText' | translate }}"
cancelText="{{ 'cancelText' | translate }}"
[selectOptions]="{{ 'selectOptionsBranch' | translate }}" >
<ion-option *ngFor="let branch of branchs; let i=index" value="{{branch.BranchCode}}">
{{branch.BranchName}}
</ion-option>
</ion-select>
</ion-item>
在html中将
[selectOptions]=“{{'selectoptionsbrack'| translate}}}”更改为[selectOptions]=“selectoptionsbrack”
:
在Typescript中,请使用以下代码:
<ion-item>
<ion-label >{{ 'branch' | translate }}</ion-label>
<ion-select [(ngModel)]="defualtBranch"
okText="{{ 'okText' | translate }}"
cancelText="{{ 'cancelText' | translate }}"
[selectOptions]="{{ 'selectOptionsBranch' | translate }}" >
<ion-option *ngFor="let branch of branchs; let i=index" value="{{branch.BranchCode}}">
{{branch.BranchName}}
</ion-option>
</ion-select>
</ion-item>