<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script src="http://jsplumb.org/js/jquery.jsPlumb-1.3.16-all-min.js"></script>
<div ng-app>
<div ng-controller="MainController">
Main
<button ng-click="addRoot()">Add Root</button>
<div class ="firstLevel" ng-repeat="firstlevel in mainLevel" ng-controller="MainController" ng-include="'templateLevel2.html'"></div>
</div>
</div>
<script type="text/ng-template" id="templateLevel2.html">
<div class="box" >
<!-- I want to fire up a function when this element gets loaded when called from template3 THIS DIV IS THE TARGET !! LOOK BELLOW FOR SOURCE-->
<div class ="secondLevel" id="{{firstlevel.id}}" class="Element-I-want-To-See-When-It-Is-Loadded" ng-controller="MainController"> First Level
<button id="{{secondlevel.id}}" ng-repeat="secondlevel in firstlevel.options" ng-click="addChild(secondlevel)">Add Second Level</button>
<button ng-click="addOption(firstlevel)">Add Options</button>
</div>
<div ng-repeat="secondlevel in firstlevel.options" ng-include="'templateLevel3.html'"> </div>
</div>
</script>
<script type="text/ng-template" id="templateLevel3.html">
<!-- This div (repeated for each children) will be the one I want to connect(this is the source) to template's div2 that where I said that it was the target-->
<div class="box">
<div class ="thirdLevel" >Second Level</div>
<div vector-draw-directive class ="thirdlevel" ng-repeat="firstlevel in secondlevel.children "ng-include="'templateLevel2.html'" onload="loaded(firstlevel)">
</div>
</div>
</script>