Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-app="testApp" ng-controller="testController">
  
  <input type="text" ng-model="hi" view-value-helper>
  <div>model: "<span ng-bind="hi"></span>"</div>
  <div>viewValue: "<span class="vv"></span>"</div>
  
  <script>
    angular
    .module('testApp', function(){})
    .controller('testController', function($scope){
      $scope.hi='m ';
    })
    .directive('viewValueHelper', function(){
      return {
        priority: 1,
        require: '?ngModel',
        link: function(scope, elem, attrs, ngModel) {
          setInterval(function(){
            var vv= angular.element(document.querySelectorAll('.vv'));
            vv.text(ngModel.$viewValue);
          },200);
        }
      }
    });
  </script>
  
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
cvnpro
0viewers