我試圖創建使用http://jquerypriceformat.com/角,與金錢格式的貨幣面具指令在飛行
所以在我的指令遠一個歐盟貨幣領域的輸入掩碼輸入框,輸入正確顯示的但我相信有什麼不對,因爲POST值是用奇怪的格式發送的,與我們在輸入字段中看到的完全不同。
我包括priceformat.js
<script src="js/jquery.price_format.1.8.min.js"></script>
<input type="text" currency-input ng-model...>
而就角:
app.directive('currencyInput', function() {
return {
require: '?ngModel',
link: function($scope, element, attrs, controller) {
element.priceFormat({
prefix: '',
centsSeparator: ',',
thousandsSeparator: '.'
});
}
};
});
我的輸入正確地顯示與掩模的值,但在POST數據(由角稱爲)它是一個不同的價值,我錯過了什麼?
輸入> 2.200,80 | post> 22,0080
謝謝
請郵寄小提琴/ Plunker調試使用。謝謝 –