无论如何我可以在我的离子警报控制器中添加按钮吗?我为一个地方创造了一个评价。用户将能够添加文本和星级评分。
我已将此星级评定用于我的申请:https://github.com/andrucz/ionic2-rating
let prompt = this.alertCtrl.create({
title: 'Rate Venue',
inputs: [{
name: 'review',
placeholder: 'Review'
},
],
buttons: [
{
text:`<rating [(ngModel)]= 'rate'
readOnly = 'false'
max = 5
emptyStarIconName =star-outline
halfStarIconName = star-half
starIconName = star
nullable = false
(ngModelChange) = onModelChange($event)>
</rating>`,
},
{
text: 'Cancel',
handler: data => {
console.log('Cancel clicked');
}
},
{
text: 'Save',
handler: data => {
console.log('Saved clicked');
}
}
]
});
prompt.present();