我在這裏想乘這兩個ticketPrice(NG-模型)和selceted numberOfTickets(NG-模型),但我總是得到NAN佔總字符串轉換爲在角JS
<tr>
<td ng-model="ticketPrice">5</td>
<td>
<select class="form-control" ng-model="numberOfTickets"
ng-options="n for n in [] | range:1:15" >
<option value="">--Select No. of Tickets--</option>
</select>
</td>
<td class="text-primary text-center"><strong ng-model="ticketsTotalPrice">{{ ticketPrice * numberOfTickets }} </strong></td>
</tr>
請給一個解決方案
謝謝!
的'NG-model'指令不'工作'元素。 – georgeawg
HI @georgeawg試試這個'' –
那麼我應該用什麼票價? –