javascript - Ng show for settings page -
i working on settings page planning poker app developing. have happen have rest of settings visible if "become scrum master checked". ive looked @ ng-show , not quite sure how works, here effort doesnt work still visible
<section class="mainbar" ng-controller="gamesetupcontroller"> <section class="matter"> <div class="container"> <h3>create game</h3> <form class="form"> <div class="form-group"> <label for="project-selector">project</label> <select class="form-control" id="project-selector" ng-model="gamecontext.project" ng-options="p.name p in projects"></select> </div> <div class="form-group"> <label for="scrum-master-checkbox">become scrum master</label> <input id="scrum-master-checkbox" type="checkbox" ng-model="gamecontext.isscrummaster" /> </div> <div id="scrum-master-options" ng-model="scrum-master-options" ng show="scrum-master-options"> <div class="form-group"> <label>card options</label> <input type="radio" ng-model="gamecontext.cardtype" value="fibonacci" />fibonacci (1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144) <input type="radio" ng-model="gamecontext.cardtype" value="modified" /> modified fibonacci (.5, 1, 2, 3, 5, 8, 13, 20, 40, 100) </div> <div class="form-group"> <label>point suggestion method</label> <input type="radio" ng-model="gamecontext.pointselectionmethod" value="average3" />take average if votes within 3 cards <input type="radio" ng-model="gamecontext.pointselectionmethod" value="mode" />take card selected players <input type="radio" ng-model="gamecontext.pointselectionmethod" value="average" /> take average of votes <input type="radio" ng-model="gamecontext.pointselectionmethod" value="none" />do not suggest story points </div> <div class="form-group"> <label for="allowreselectcard">allow cards reselected</label> <input id="allowreselectcard" type="checkbox" ng-model="gamecontext.allowreselectcard" /> </div> </div> </form> <a href="{{href()}}" class="btn btn-primary btn-lg" ng-disabled="gamecontext.project.id === undefined" title="{{ gamecontext.project.id === undefined ? 'please select project' : 'join ' + gamecontext.project.name + ' game' }}">join game</a> </div> </section>
bind ng-show
gamecontext.isscrummaster
instead because that's model updated checkbox. also, remove ng-model
containing div because applies inputs, selects, textareas, , custom form controls.
<div id="scrum-master-options" ng-show="gamecontext.isscrummaster"> ... </div>
javascript angularjs
No comments:
Post a Comment