diff --git a/components/ionActionSheet/ionActionSheet.html b/components/ionActionSheet/ionActionSheet.html index 52000d1..6c476eb 100644 --- a/components/ionActionSheet/ionActionSheet.html +++ b/components/ionActionSheet/ionActionSheet.html @@ -2,6 +2,11 @@
+
+ {{#each navButtons}} + + {{/each}} +
{{#if titleText}}
diff --git a/components/ionActionSheet/ionActionSheet.js b/components/ionActionSheet/ionActionSheet.js index e38ee5b..cec627f 100644 --- a/components/ionActionSheet/ionActionSheet.js +++ b/components/ionActionSheet/ionActionSheet.js @@ -12,7 +12,14 @@ IonActionSheet = { index: i }); } - + var navButtons = []; + for (var i = 0; i < options.navButtons.length; i++) { + var button = options.navButtons[i]; + navButtons.push({ + text: button.text, + index: i + }); + } var data = { titleText: options.titleText, destructiveText: options.destructiveText, @@ -100,7 +107,10 @@ Template.ionActionSheet.events({ var index = $(event.target).data('index'); IonActionSheet.buttonClicked(index); }, - + 'click [data-index]': function (event, template) { + var index = $(event.target).data('index'); + IonActionSheet.navButtonClicked(index); + }, 'click [data-destructive]': function (event, template) { IonActionSheet.destructiveButtonClicked(); },