다음과 같은 disable 속성을 사용하여 ion-select를 비활성화 할 수 있습니다.
<ion-item>
<ion-label stacked>Property Type</ion-label>
<ion-select [(ngModel)]="propType" (ionChange)="ionChanger()" disabled="true" >
<ion-option value="{{ptype}}" *ngFor="let ptype of PropTypeArray">{{ptype}}</ion-option>
</ion-select>
</ion-item>
typescript 파일에서 어떻게 비활성화 할 수 있습니까? 다음 명령을 시도했지만 운이 없습니다
내 유형 스크립트 파일에서
disableSelector:boolean
constructor(){
this.disableSelector = true;
}
여기는 html 파일에 있습니다.
disabled = "disableSelector"
전혀 일할 수 없다
최고의 Rgds, 개구리
당신이 사용하고 disableSelector
당신이 그것을 사용할 필요가 있도록 변수를 [disabled]
다음과 같이 바인딩 특성,
<ion-item>
<ion-label stacked>Property Type</ion-label>
<ion-select [(ngModel)]="propType"
(ionChange)="ionChanger()"
[disabled]="disableSelector" > //<<< This is required.
<ion-option value="ptype" //<<< removed {{}} braces.
*ngFor="let ptype of PropTypeArray">
{{ptype}}
</ion-option>
...
</ion-item>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다