Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html ng-app="App">
<head>
<script src="//code.angularjs.org/1.2.26/angular.js"></script>
  <meta charset="utf-8">
  <title>Demo</title>
</head>
<body>
  <div my-directive>
    <input type="text">
  </div>
</body>
</html>
 
angular.module('App', []).directive('myDirective', function() {
  return {
    template: '<div>Template</div>',
    compile: function(element) {
      console.log(element.html());
    }
  };
});
Output

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

Dismiss x
public
Bin info
anonymouspro
0viewers