Here's a Chart-generated diagram:
<div class="diagram">
<canvas id="pie" class="chart chart-pie" width="150" height="150" data="ModalObj.FunctionalTest" labels="labels" colours="Colours">
</canvas>
This is a directive:
.directive('modal', function () {
return {
template: '<ng-include src="getTemplateUrl()"/>',
restrict: 'E',
controller: function($scope) {
//function used on the ng-include to resolve the template
$scope.getTemplateUrl = function() {
return $scope.path;
}
}
}});
In addition, I need to include the diagram in a modal if the template URL requires it; not all templates make use of the chart.