Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.21/angular.min.js"></script>
</head>
<body ng-app="app">
  <div ng-controller="myCtrl">
    <input placeholder="first name" ng-model="fn" ng-change="changed()" />
    <input placeholder="last name" ng-model="ln" ng-change="changed()" />
    
    <input placeholder="user name" ng-value="un" />
  </div>
</body>
</html>
 
    var app = angular.module("app", []);
    app.controller("myCtrl", ["$scope", function ($scope){
      $scope.fn = "";
      $scope.ln = "";
      
      $scope.changed = function () {
        if ($scope.fn.length > 0)
          $scope.un = $scope.fn[0] + $scope.ln;
        else 
          $scope.un = "";
      };
    }]);
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers