Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="myApp">
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body ng-controller="MainCtrl as main">
  <canvas id="myCanvas" width="600" height="300"></canvas>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.4.0-beta.1/angular.min.js"></script>
</body>
</html>
 
var myApp = angular.module('myApp', []);
myApp.controller('MainCtrl', ['$window', '$document',
  function($window, $document) {
    var canvas = $document.getElementById('myCanvas');
    var context = canvas.getContext('2d');
    context.fillRect(10, 10, 100, 600);
  }
]);
Output

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

Dismiss x
public
Bin info
LASkumapro
0viewers