[NG] ng-model


這是一個綁定用的方法,像這個例子,他會綁到該controller的對應變數(pricecount)

對應變數(pricecount)可以不需要預設,直接寫在html上也可以

<input type="number" ng-model="price">
<br>
<input type="number" ng-model="count">
<pre>
{{price * count | currency:'NT'+$}}
</pre>

留言