title: Use dot notation with angular number filter
body: <p>I have an input field. The user enters a number. I need this number to be formatted correctly with dots representing the thousands (not the decimals)
  user input : 5600 -> becomes 5.600 (five thousand six hundred)
  user input: 56000 -> becomes 56.000
  etc</p>
  
  <p>I need the number to be formatted correctly INSIDE the input field.</p>
  
  <p>I have a fiddle : <a href="http://jsfiddle.net/El4a/KPeBD/1059/" rel="nofollow noreferrer">http://jsfiddle.net/El4a/KPeBD/1059/</a></p>
  
  <p>This fiddle works perfectly BUT it uses the number filter from angular thus it formats the numbers with a comma-notation. I however need a dot-notation.</p>
  
  <p>So I tried replacing the comma manually by a dot. </p>
  
  <pre><code> var listener = function() {
  
              var value = $element.val().replace(/,/g, '') //delete all notations
  
              var x = $element.val($filter('number')(value, 0)) //filter
              $element.val(x).replace(/,/g, '.') //replace comma by dot
          }
  </code></pre>
  
  <p>This didn't work.</p>
  
  <p>I then tried to use a locale cdn (as can be seen in the linked fiddle).
  This seemed to be the solution at first creating :</p>
  
  <p><a href="https://i.stack.imgur.com/QrmPo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QrmPo.png" alt="dot-notation"></a></p>
  
  <p>But when the next 0 is added it flips and does :</p>
  
  <p><a href="https://i.stack.imgur.com/C9RGn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C9RGn.png" alt="nope"></a></p>
  
  <p>I figured I also had to change the following line</p>
  
  <pre><code>var value = $element.val().replace(/,/g, '')
  </code></pre>
  
  <p>to</p>
  
  <pre><code>var value = $element.val().replace(/./g, '')
  </code></pre>
  
  <p>but then the input field is completely unusable.</p>
  
  <p>Hope someone has a solution for me!</p>