mercredi 12 octobre 2016

Angularjs - checkbox to update SPAN

thanks for looking.

I'm new to Angular and am having some issues.

I have some checkboxes that when clicked, will display some text inside a SPAN tag.

Thats it. I just cannot get it to work!

Default page

Selected Page

So to Clarify - When the user checks the checkboxes - the the text over the image changes (border added).

Hope this makes sense.

Here's my code so far:

 <span id="PartyWall1" style="position:absolute;top:42px; left:141px; font-weight:bold; color:red; font-size:12px;">Wall 1</span>
        <span id="PartyWall2" style="position:absolute;top:345px; left:141px; font-weight:bold; color:red; font-size:12px;">Wall 2</span>
        <span id="PartyWall3" style="position:absolute;top:175px; left:85px; font-weight:bold; color:red; font-size:12px;">Wall 3</span>
        <span id="PartyWall4" style="position:absolute;top:175px; left:204px; font-weight:bold; color:red; font-size:12px;">Wall 4</span>




  <div class=" col-lg-12 col-md-12" ng-if="IsPartWall">
                            <div class="form-group form-group-icon-right">
                                <label>Which wall(s) are Party wall(s)? </label>
                                <div class="checkbox checkbox-small">
                                    <input name="cb1" id="cb1" type="checkbox" ng-model="objPostData.Wall1" tabindex="12" value="123"/>

                                    <label for="cb1">wall-1</label>
                                </div>
                                <div class="checkbox checkbox-small">
                                    <input type="checkbox" id="cb2" ng-model="objPostData.Wall2" tabindex="13" value="123" name="cb2"/>
                                    <label for="cb2">wall-2</label>
                                </div>
                                <div class="checkbox checkbox-small">
                                    <input type="checkbox" id="cb3" ng-model="objPostData.Wall3" tabindex="14" value="123" name="cb3"/>
                                    <label for="cb3">wall-3</label>
                                </div>
                                <div class="checkbox checkbox-small">
                                    <input type="checkbox" id="cb4" ng-model="objPostData.Wall4" tabindex="15" value="123" name="cb4"/>
                                    <label for="cb4">wall-4</label>
                                </div>
                            </div>
                        </div>




Aucun commentaire:

Enregistrer un commentaire