2014-03-01 108 views

回答

2

它只是您自己創建的自定義組件,沒有什麼複雜的。它更多關於html標記,但不是JavaScript。

例如AngularJS解決方案:

<div ng-controller="main"> 
    <div ng-click="toggle()"> {{count}} options selected</div> 
<div ng-show="showOptions"> 
    <label ng-repeat="option in options">{{option}}<input type="checkbox" ng-model="selected[$index]" ng-change="update()"/><br/></label> 
    </div></div> 

http://jsfiddle.net/STEVER/mhb2p/

相關問題