1- < div class ="container ">
1+ < div class ="container " ng-controller =" ExampleCtrl " >
22 < div class ="row ">
33 < div class ="col-xs-12 col-sm-8 ">
44 < h1 class ="title "> AngularJS Dropdown Multiselect</ h1 >
@@ -20,7 +20,7 @@ <h1 class="title">AngularJS Dropdown Multiselect</h1>
2020 < h2 style ="margin-bottom: 0 "> Basic Usage Example</ h2 >
2121 </ div >
2222 </ div >
23- < div ng-controller =" ExampleCtrl " class ="row ">
23+ < div class ="row ">
2424 < div class ="col-xs-12 col-sm-6 ">
2525 < h3 > Demo</ h3 >
2626 < div class ="well ">
@@ -41,7 +41,7 @@ <h2 style="margin-bottom: 0">Basic Settings Example</h2>
4141 In this case, the property the used as label is "id".
4242 </ div >
4343 </ div >
44- < div ng-controller =" ExampleCtrl " class ="row ">
44+ < div class ="row ">
4545 < div class ="col-xs-12 col-sm-6 ">
4646 < h3 > Demo</ h3 >
4747 < div class ="well ">
@@ -67,7 +67,7 @@ <h2 style="margin-bottom: 0">Custom ID property</h2>
6767 This feature is also useful if your objects comes from MongoDB and have a "_id" property instead of "id".
6868 </ div >
6969 </ div >
70- < div ng-controller =" ExampleCtrl " class ="row ">
70+ < div class ="row ">
7171 < div class ="col-xs-12 col-sm-6 ">
7272 < h3 > Demo</ h3 >
7373 < div class ="well ">
@@ -90,7 +90,7 @@ <h2 style="margin-bottom: 0">Model Custom Property</h2>
9090 You can modify this by using the externalIdProp in settings!
9191 </ div >
9292 </ div >
93- < div ng-controller =" ExampleCtrl " class ="row ">
93+ < div class ="row ">
9494 < div class ="col-xs-12 col-sm-6 ">
9595 < h3 > Demo</ h3 >
9696 < div class ="well ">
@@ -111,7 +111,7 @@ <h2 style="margin-bottom: 0">Custom Button Text</h2>
111111 You can select your own text of the button using the "defaultText" in settings.
112112 </ div >
113113 </ div >
114- < div ng-controller =" ExampleCtrl " class ="row ">
114+ < div class ="row ">
115115 < div class ="col-xs-12 col-sm-6 ">
116116 < h3 > Demo</ h3 >
117117 < div class ="well ">
@@ -126,4 +126,50 @@ <h3>The model: </h3>
126126 < pre > {{example5model|json}}</ pre >
127127 </ div >
128128 </ div >
129+ < div class ="row ">
130+ < div class ="col-xs-12 ">
131+ < h2 style ="margin-bottom: 0 "> Pre-selected values</ h2 >
132+ This example shows a demostration of using a pre-setted model.< br />
133+ < strong > Note: </ strong > The model must be structured as array of objects with "id" property (or whatever you use as custom id).
134+ </ div >
135+ </ div >
136+ < div class ="row ">
137+ < div class ="col-xs-12 col-sm-6 ">
138+ < h3 > Demo</ h3 >
139+ < div class ="well ">
140+ < div >
141+ < div ng-dropdown-multiselect options ="example6data "
142+ selected-model ="example6model " extra-settings ="example6settings "> </ div >
143+ </ div >
144+ </ div >
145+ </ div >
146+ < div class ="col-xs-12 col-sm-6 ">
147+ < h3 > The model: </ h3 >
148+ < pre > {{example6model|json}}</ pre >
149+ </ div >
150+ </ div >
151+ < div class ="row ">
152+ < div class ="col-xs-12 ">
153+ < h2 style ="margin-bottom: 0 "> Full Object as model</ h2 >
154+ This example shows a demostration of using full object as a model. < br />
155+ This can be done by settings the "externalIdProp" to empty string.< br />
156+ < strong > Note: The object detection and the logic of deciding which object is selected is still
157+ uses only the "id" property, so you can even modify the objects in the model without worry.</ strong >
158+ </ div >
159+ </ div >
160+ < div class ="row ">
161+ < div class ="col-xs-12 col-sm-6 ">
162+ < h3 > Demo</ h3 >
163+ < div class ="well ">
164+ < div >
165+ < div ng-dropdown-multiselect options ="example7data "
166+ selected-model ="example7model " extra-settings ="example7settings "> </ div >
167+ </ div >
168+ </ div >
169+ </ div >
170+ < div class ="col-xs-12 col-sm-6 ">
171+ < h3 > The model: </ h3 >
172+ < pre > {{example7model|json}}</ pre >
173+ </ div >
174+ </ div >
129175</ div >
0 commit comments