<!DOCTYPE html>
<html>

  <head>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0-beta.1/angular.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.min.js"></script>
    <script src="script.js"></script>
  </head>

  <body>
    <h1>Control Binding In Plain Javascript</h1>
    <input type=text id="TxtCustomerName" placeholder="TxtCustomerName" onkeyup="UitoObject()"/>
    <input type=text id="TxtCustomerName2" placeholder="TxtCustomerName2" onkeyup="ObjecttoUi()"/>
    
    <h1>Control Binding In Angular1</h1>
    <div ng-app>
      <input type=text id="TxtUser" placeholder="TxtUser"  ng-model="Customer"/>
      <input type=text id="TxtUser2" placeholder="TxtUser2"  ng-model="Customer"/>
    </div>
  </body>

</html>
function Customer() 
{
  this.CustomerName = "";
}
var Cust = new Customer();

function UitoObject() 
{
  Cust.CustomerName = $("#TxtCustomerName").val();
  ObjecttoUi() 
}
function ObjecttoUi() 
{
  $("#TxtCustomerName2").val(Cust.CustomerName);
  
}
/* Styles go here */