Description
Dynamic Select Box is an IONIC plugin with multiple or single select functionality.
Features:
1. Open Select Box in modal.
2. Dynamic option to act as multiple sector or single selector.
3. Manage the click events item click.
Usage:
First of all, download the files.
1. Include dynamicselectbox.css in your index.html:
<link href=”whereyouputfolder/dynamicselectbox/dist/dynamicselectbox.css”
rel=”stylesheet”>
2. Include dynamicselectbox.js in your index.html:
<script type=”text/javascript”
src=”whereyouputfolder/dynamicselectbox/dist/dynamicselectbox.js”></script>
3. Add the module dynamicselectbox to your application dependencies in your app.js :
angular.module(‘starter’, [‘ionic’, ‘dynamicselectbox’] )
4. Configure module:
App.config(function(selectboxProvider) { selectboxProvider.setTemplateUrl(‘whereyouputfolder/dynamicselectbox/dist/templates/itemtemplate.html’);
selectboxProvider.setModalTemplateUrl(‘whereyouputfolder/dynamicselectbox/dist/templates/modaltemplate.html’);
});
And you’re ready to go.
Directive:
<selectbox
headertext=”Header”
items=”data”
multiple=true
textproperty=”value”
valueproperty=”id”
text=”Text default Select Box”
modaltemplateurl=”whereyouputfolder/dynamicselectbox/dist/templates/inputtemp
late.html”
templateurl=”bower_components/dynamicmultiselect/templates/dist/outputtemplate.html”
notetext=”Note Text”
valuechanged=”onValueChanged(value)”>
</selectbox>
Example of template object and event handler of cart in controller :
$scope.data = [
{id: 1, value: “Item 1”},
{id: 2, value: “Item 2”},
{id: 3, value: “Item 3”},
{id: 4, value: “Item 4”},
{id: 5, value: “Item 5”},
{id: 6, value: “Item 6”},
{id: 7, value: “Item 7”},
{id: 8, value: “Item 8”}
];
$scope.onValueChanged = function(value){
console.log(value);
}
Attributes:
1. headertext
Type: String
Used to specify the text that is shown in the Modal’s header bar.
2. Items
Type: Array
A list of items that is bound to the select.
3. multiple
Type: Boolean
TRUE for for multiple select or FALSE for single select .
4. textproperty
Type: String
Property description of item the array.
5. valueproperty
Type: String
Property id of item the array.
6. text
Type: String
Value default multiselect.
7. modaltemplateurl
Type: URL
An optional URL that can be used to customise the look and feel of the Modal
8. templateurl
Type: URL
An optional URL that can be used to custom the look and feel of fancyselect
element.
9. notetext
Type: String
An optional note that can be displayed in the default Select Box element.
10. valuechanged (Callback)
Parameters: value The currently selected value or list of values
Raised when the current value changes.
}
If you are interested in full ‘E-Commerce Package’ or have any query Contact Us
Reviews
There are no reviews yet.