這是一個綁定用的方法,像這個例子,他會綁到該controller的對應變數(price、count)
對應變數(price、count)可以不需要預設,直接寫在html上也可以
<input type="number" ng-model="price">
<br>
<input type="number" ng-model="count">
<pre>
{{price * count | currency:'NT'+$}}
</pre>
<br>
<input type="number" ng-model="count">
<pre>
{{price * count | currency:'NT'+$}}
</pre>
留言
張貼留言