Really struggling with this - have tried every way I can think of. Hopefully, somebody can help.
I have a directive which creates the outline of a custom control fo
Try this fiddle http://jsfiddle.net/xpKwb/12/
You can use ngSwitch
<div ng-repeat='template in inner'>
<div ng-switch on="template">
<div ng-switch-when="one">
<div class='one'></div>
</div>
<div ng-switch-when="two">
<div class='two'></div>
</div>
</div>
I have create a fiddle here.
These are the directives.
<script type="text/ng-template" id="one">
<div class="one"></div>
</script>
<script type="text/ng-template" id="two">
<div class="two"></div>
</script>
And here you do dynamic loading
<div ng-repeat='template in inner' ng-include='template'></div>
See if this helps you, and solves your purpose. I am making each directive into a template and then using ng include