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 ng-app="myApp">
<A a1>
    <B b1 b2></B>
    <C>
        <E e1></E>
        <F>
          <G></G>
        </F>
    </C>
    <D d1></D>
</A>
</body>
</html>
 
    var app = angular.module('myApp', []);
    var names = ['a1', 'b1', 'b2', 'e1', 'd1'];
    names.forEach(function (name) {
      app.directive(name, function () {
        return {
            compile: function () {
                 console.log(name + ' compile');
                return {
                    pre: function () {
                        console.log(name + ' preLink');
                    },
                    post: function () {
                        console.log(name + ' postLink');
                    }
                };
            }
        };
      });
    });
Output

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

Dismiss x
public
Bin info
Lovesueeepro
0viewers