title: Custom directive to convert percent
body: <p>hello guys I am trying to create a custom directive in angular 2 which will change the value of an input ngModel to percent for example</p>
  
  <p>number / 100</p>
  
  <p><a href="https://i.stack.imgur.com/hcwYO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hcwYO.png" alt="example image"></a></p>
  
  <p>this is an example image of what I am trying to achieve. </p>
  
  <p>For example the user sees the 5.12 but the value that will be send in the back end should be 5.12 / 100, but the user doesn't see this</p>
  
  <p>I have come to an approach but I think that is a wrong approach can you guys help me out.</p>
  
  <p>this is my <a href="https://plnkr.co/edit/7QsyP58Zw2X5GokEDanu?p=preview" rel="nofollow noreferrer"><code>code</code></a>.</p>
  
  <p>for example: </p>
  
  <p>when it comes from backend to be multiplied by *100 and when it goes to backend to be divided by /100</p>