Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="myApp" ng-controller="myCtrl">
<head>
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/angular.js/1.2.1/angular.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
  <mydir ng-class="{'some-class': test==test}"></mydir>
</body>
</html>
 
.some-class {
  background: red;
}
 
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope) {
  $scope.test = true;
});
app.directive('mydir', function() {
  return {
    restrict: 'E',
    template: '<div>Test</div>'
  };
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers