1

I'm using Angular UI, I already loaded dependencies and got the module 'ui.bootstrap''.

Attempting to imitate this. This is what I'm trying:

<div class="form-group">
    <div class="btn-group">
      <label ng-model="reactionType" uib-btn-radio="left" uncheckable class="btn btn-sucess">Alegría</label>
      <label ng-model="reactionType" uib-btn-radio="middle" uncheckable class="btn btn-default">Tristeza</label>
      <label ng-model="reactionType" uib-btn-radio="right" uncheckable class="btn btn-default">Tristeza</label>
    </div>
  </div>

And got

enter image description here

so first button on the left keeps always checked while the others seem to be uncheckable. What am I missing?

1 Answer 1

2

It's super subtle, but you are missing the single quotes in the uib-btn-radio values.

ie: "'left'"

Revised Code Below:

<label ng-model="reactionType" uib-btn-radio="'left'" uncheckable class="btn btn-default">Alegría</label>
<label ng-model="reactionType" uib-btn-radio="'middle'" uncheckable class="btn btn-default">Tristeza</label>
<label ng-model="reactionType" uib-btn-radio="'right'" uncheckable class="btn btn-default">Tristeza</label>
Sign up to request clarification or add additional context in comments.

1 Comment

ouch! that's nasty. spent a few hours on this and would have never caught that. thanks!!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.