html - ionic : Unable to click into <a> element inside <ion-checkbox>

标签 html ionic-framework

我正在尝试使用以下代码在我的应用程序中创建 TOS 协议(protocol)字段:

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

但我不知道为什么我没有被重定向到 TOS 文件(如元素所引用)。

那么这里出了什么问题呢?有可能解决这个问题吗?

最佳答案

最后,在查看以下解决方案后: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>

关于html - ionic : Unable to click into <a> element inside <ion-checkbox>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37470603/

相关文章:

javascript - 仅将数组的最后一个元素添加到现有数组中

angular - ionic 4 : 'ion-slide' is not a known element

angular - ionic 与 SSR 实现

html - 垂直对齐连字 rune 本和图标

html - 屏幕阅读器的表格样式输入

html - 表体和多个表头对齐

angular - Ionic3 - 自定义组件中的模板解析错误

css - 为 ion-tabs 设置背景图片

javascript - 使用 CamanJS 进行图像处理

javascript - 将 javascript 变量传递给同一 php 文件中的 php 变量