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.js"></script>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
  <div ng-app="myApp">
    <div ng-controller="MyController as ctrl">
      <button ng-click="ctrl.show()">{{ctrl.text}}</button>
    </div>
  </div>
</body>
</html>
 
    var app = angular.module("myApp", []);
    app.controller("MyController", ['$scope',function(scope) {
          this.text = "点我";
          this.show = function () {
            console.log(this.text);
          }
    }]);
Output

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

Dismiss x
public
Bin info
Lovesueeepro
0viewers