How to have a link in checkbox label?

It is common to have some licence link in a checkbox which must be agreed during registration.

I tried both ionCheckbox and the following, but both failed as the link is not clickable at all. How should I get it?

<label class="item item-checkbox item-checkbox-right">
          <span class="input-label">agree</span>
          <a href="#/licence.html">the licence</a>
          <label class="checkbox">
            <input type="checkbox" ng-model="agree">
1 Like

Inspired by mhartington,
I figure out I should replace the outer label element with div.
And then the link is clickable.

However, the link shows in a new line…

Hows this?


It seems the link is not clickable :frowning:

derp, thats why we weren’t using labels… hold on

You could just do this.

<span>agree    <a href="#/licence.html">the licence</a></span>         

Then it is not clickable again.

I have the same problem

You could do this.

This solution works for both the directive and the pure html.

Thank you, @mhartington. It works.
It will be great If the checkbox span is also clickable.
Anyway, it works :wink:

This seems to be broken in beta 11. Any other suggestions?

@mhartington The link is not clickable again with ionic nightly.

This solution doesn’t work in beta 14 ? Can help?

This will work as long as you don’t use the directive


Actually I am using the directive…
Thank you for help! :slight_smile: I will try~

thanks! you helped me out a lot

How I can achieve that with ionic 4? Thanks!