Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app>
<head>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://lib.sinaapp.com/js/angular.js/angular-1.2.19/angular.min.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div ng-controller="Ctrl">{{msg}}</div>
  <a href="javascript:void(0);" id="test">Test</a>
</body>
</html>
 
function Ctrl($scope,$timeout, $http){
    $scope.msg="hello";
  
    function updateMsg () {
        $scope.msg="world";
        $scope.$apply();
    }
    
    $http.get("/").success(updateMsg);
    $("#test").click(updateMsg);
}
Output

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

Dismiss x
public
Bin info
michalliupro
0viewers