Ionic 3 Popover无法添加标签或跨度标签

时间:2018-07-03 08:40:38

标签: angular ionic-framework ionic3

我在大学项目中使用了Ionic 3,但遇到了一些问题,我在其中添加了此代码部分headding: 'SOMETEXT <ion-label class="special-txt">$100 </ion-label>,但其输出却像这样SOMETEXT <ion-label class="special-txt">$100 </ion-label> 不能更改.special-txt的颜色,并且始终从输出组件

显示

Image example

.ts

doAlertPayment() {
        let options = {enableBackdropDismiss: true};
        let alrt = this.popoverCtrl.create(AlertsystemPage, {
            type: '1',
            headding: 'SOMETEXT <ion-label class="special-txt">$100 </ion-label> 

            subHeadding: '',
            alertMessage: this.master.language.getLanguageLabel('paymentValidPeriod'),
            positiveBtnText: this.master.language.getLanguageLabel('confirmPayment'),
            negativeBtnText: '',
            responseData: '0',
            cssClass: 'custom-popover'
          },
          options);

        alrt.onDidDismiss(data => {
          if(data){
            this.showQRCode = true;
          }
          console.log("Action completed!");
        });

        alrt.present(); // present on center

    }}

css

.custom-popover .special-txt {color: #f44336;}

0 个答案:

没有答案