I didn't see the template in the actual plunker. But, I believe it was having issues because the tempalte could not be found. Here is an updated plunker that works.
I use some JavaScript magic to create a dynamic path to the directive's template:
var scripts = document.getElementsByTagName("script");
var currentScriptPath = scripts[scripts.length-1].src;
var app = angular.module('LaunchRockApp', []);
app.controller("MainController", function($scope){});
app.directive('selectBlock', function(){
return {
scope: {
lrBlockId: '='
},
templateUrl: currentScriptPath.substring(0, currentScriptPath.lastIndexOf('/') + 1) + 'select-block-type.html',
};
});
And I also added a select-block-type.html file:
Template
{{lrBlockId}}
I didn't notice the in-line template. In that case, just modify it like I did above by removing the '-' inside the variable you want to output:
<script type="text/ng-template" id="select-block-type.html">
<p>Block Id = {{lrBlockId}}</p>
</script>