Ionic2评级栏问题

时间:2017-09-19 04:35:53

标签: angular ionic2 rating

我正在学习ionic2。我想在我的应用中使用评级星。我引用了这个链接rating star ionic2。但是当我添加标记output时,我在链接中遇到了一个问题。 任何人都可以帮我解决这个问题吗?

rating.html

<ion-content class="has-header">
<rating [(ngModel)]="rate" 
    readOnly="false"
    max="5"
    emptyStarIconName="star-outline" 
    halfStarIconName="star-half" 
    starIconName="star" 
    nullable="false"
    (ngModelChange)="onModelChange($event)"></rating>

1 个答案:

答案 0 :(得分:1)

您需要在 public class TestForm { internal static IDialog<SandwichOrder> MakeRootDialog() { return Chain.From(() => FormDialog.FromForm(SandwichOrder.BuildForm)) .Do(async (context, order) => { var serialNumber = context.UserData.GetValue<string>("SerialNumber"); context.UserData.SetValue("SerialNumber", ""); var completed = await order; // Actually process the sandwich order... await context.PostAsync("Defect data submitted!"); }); } }

中导入 <div class="row justify-content-center"> <div class="card col-10 cardBody"> <div class="card-block"> <div class = "container"> <c:if test="${not empty loanEntries1}"> <table id="table1" border="1" style="float:left; margin-right:10px;"> <thead class="thead-default"> <tr> <th>Sel</th> <th>Loan Id</th> <th>Amount</th> </tr> </thead> <tbody> <c:forEach var="entry" items="${loanEntries1}"> <tr> <td><input type="checkbox" class="checkbox"></td> <td><c:out value ="${entry.loanId}"/></td> <td><c:out value ="${entry.amount}"/></td> </tr> </c:forEach> </tbody> </table> </c:if> <div style="float:left"> <c:if test="${not empty loanEntries2}"> <input type= "button" id="aggregate" value="aggregate" onclick="aggregate()"> <input type= "button" id="deaggregate" value="deaggregate" onclick="deaggregate()"> <input type= "button" id="cancel" value="cancel"style="float:left" > </c:if> </div> <c:if test="${not empty loanEntries2}"> <table id="table2" border="1" style="float:left"> <thead class="thead-default"> <tr> <th>Sel</th> <th>Loan Id</th> <th>Amount</th> </tr> </thead> <tbody> <c:forEach var="entry" items="${loanEntries2}"> <tr> <td><input type="checkbox" class="checkbox"></td> <td><c:out value ="${entry.loanId}"/></td> <td><c:out value ="${entry.amount}"/></td> </tr> </c:forEach> </tbody> </table> </c:if> </div> </div> </div> </div> <script type="text/javascript"> console.log("in block"); function aggregate(){ var row = $('#table1 tbody tr td input.checkbox:checked').closest('tr').clone(); console.log("==>",row); $('#table2 tbody').append(row); $('#table1 tbody tr td input.checkbox:checked').closest('tr').remove(); }; function deaggregate(){ var row = $('#table2 tbody tr td input.checkbox:checked').closest('tr').clone(); console.log("rows:",row); // var row = $('#table2 tbody tr td input.checkbox:checked').parent().clone(); $('#table1 tbody').append(row); $('#table2 tbody tr td input.checkbox:checked').closest('tr').remove(); }; </script>
Ionic2RatingModule