JSFiddle - React, Tailwind, and code Playground
HTML
<DOCTYPE html />
<html ng-app>
<head>
<title>Testing databinding</title>
<script src="http://code.angularjs.org/angular-1.0.1.min.js" type="text/javascript"></script>
<script src="https://raw.github.com/jquery/globalize/master/lib/globalize.js" type="text/javascript"></script>
<script src="assets/js/controller.js" type="text/javascript"></script>
</head>
<body>
<div ng-controller="SampleCtrl">
<input ng-model="visibleProperty"> <br>
{{outputMessage}} <br>
hiddenProperty as currency: {{hiddenProperty | currency}} <br>
visibleProperty: {{visibleProperty}} <br>
<input ng-model="hiddenProperty"><br>
</div>
</body>
</html>
JavaScript
function SampleCtrl($scope) {
$scope.outputMessage = "no message";
$scope.visibleProperty= 0.0;
$scope.hiddenProperty = 0.0;
$scope.$watch("visibleProperty", function (newValue, oldValue) {
$scope.outputMessage = "oldValue: " + oldValue + " newValue: " + newValue;
$scope.hiddenProperty = Globalize.parseFloat(newValue);
});
};