Skip to content

Commit

Permalink
feat($ionicActionSheet): allow html binding
Browse files Browse the repository at this point in the history
Closes #1219
  • Loading branch information
ajoslin committed Apr 29, 2014
1 parent ab244c6 commit 3e5b39f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions js/angular/directive/actionSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ IonicModule
'<div class="action-sheet-wrapper">' +
'<div class="action-sheet">' +
'<div class="action-sheet-group">' +
'<div class="action-sheet-title" ng-if="titleText">{{titleText}}</div>' +
'<button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons">{{button.text}}</button>' +
'<div class="action-sheet-title" ng-if="titleText" ng-bind-html="titleText"></div>' +
'<button class="button" ng-click="buttonClicked($index)" ng-repeat="button in buttons" ng-bind-html="button.text"></button>' +
'</div>' +
'<div class="action-sheet-group" ng-if="destructiveText">' +
'<button class="button destructive" ng-click="destructiveButtonClicked()">{{destructiveText}}</button>' +
'<button class="button destructive" ng-click="destructiveButtonClicked()" ng-bind-html="destructiveText"></button>' +
'</div>' +
'<div class="action-sheet-group" ng-if="cancelText">' +
'<button class="button" ng-click="cancel()">{{cancelText}}</button>' +
'<button class="button" ng-click="cancel()" ng-bind-html="cancelText"></button>' +
'</div>' +
'</div>' +
'</div>' +
Expand Down
2 changes: 1 addition & 1 deletion js/angular/service/actionSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* // Show the action sheet
* $ionicActionSheet.show({
* buttons: [
* { text: 'Share' },
* { text: '<b>Share</b> This' },
* { text: 'Move' },
* ],
* destructiveText: 'Delete',
Expand Down
10 changes: 5 additions & 5 deletions test/html/actionsheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@
$scope.show = function() {
$ionicActionSheet.show({
buttons: [
{ text: 'Share' },
{ text: 'Move' },
{ text: 'Share <i class="icon ion-beaker"></i>' },
{ text: 'Move <i class="icon ion-person"></i>' },
],
destructiveText: 'Delete',
titleText: 'Modify your album',
cancelText: 'Cancel',
destructiveText: 'Delete <i class="icon ion-minus"></i>',
titleText: 'Modify your album <i class="icon ion-android-book"></i>',
cancelText: 'Cancel <i class="icon ion-no-smoking"></i>',
cancel: function() {
console.log('CANCELLED');
},
Expand Down

0 comments on commit 3e5b39f

Please sign in to comment.