diff --git a/example.html b/example.html
new file mode 100644
index 0000000..736013e
--- /dev/null
+++ b/example.html
@@ -0,0 +1,55 @@
+
+
+
+
+
+ Ionic Fancy Select Example
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ the selected value is {{selected}}
+
+
+
+
+
+
diff --git a/src/ionic-fancy-select.js b/src/ionic-fancy-select.js
index 5fda21f..5f6141b 100644
--- a/src/ionic-fancy-select.js
+++ b/src/ionic-fancy-select.js
@@ -76,7 +76,7 @@ angular.module("ionic-fancy-select", ["ionic"])
} else {
scope.modal = $ionicModal.fromTemplate(
- ' {{headerText}}
{{item.Name}} ',
+ ' {{headerText}}
{{item.Name}} ',
{
scope: scope,
animation: scope.modalAnimation
@@ -192,6 +192,12 @@ angular.module("ionic-fancy-select", ["ionic"])
scope.hideItems();
};
+ scope.removeSelection = function() {
+ scope.text = scope.defaultText;
+ delete scope.value;
+ scope.hideItems();
+ };
+
// Watch the value property, as this is used to build the text
scope.$watch(function(){return scope.value;}, scope.onValueChanged, true);
}
diff --git a/templates/modal-template.html b/templates/modal-template.html
index ac77e76..f6e293e 100644
--- a/templates/modal-template.html
+++ b/templates/modal-template.html
@@ -2,7 +2,8 @@
{{headerText}}
-
+
+