Ionic:无法点击<a> element inside <ion-checkbox>

时间:2016-05-26 20:41:43

标签: html ionic-framework

I'm trying to create a TOS agreement field inside my app, using the following code:

<ion-checkbox style="text-align:center" ng-model="signup.tospp">I agree to the <a href="../man/TOS">Terms of Service</a></ion-checkbox>

But I don't know why I don't get redirected to the TOS file (as refered by the element).

So what's wrong here? is there any possibility to fix that?

1 个答案:

答案 0 :(得分:3)

最后,在查看以下解决方案之后:https://forum.ionicframework.com/t/ion-checkbox-with-an-external-link/25335

我能够使用以下代码解决我的问题:

-CSS:

.item-checkbox .checkbox {
      right: auto !important;
      }

-HTML:

<div style="text-align:center" class="item item-checkbox">
          <label class="checkbox">
        <input ng-model="data.tospp" type="checkbox">
          </label>
I agree to the <a ng-click="tos()" target="_blank">Terms of Service</a>
        </div>