Sample HTML code:
<div tile-component included-svg='::installController.installUpdatesSvg'></div>
Install controller:
**A scope variable named 'installUpdatesSvg' is defined**
this.installUpdateSvg = 'xyzSvg';
Directive snippet:
.directive('tileComponent',
['cvLoc','$timeout','$sce',
function(cvLoc, $timeout,$sce) {
return {
restrict : 'EA',
transclude : true,
scope : {
includedSvg : '=?'
},
link : function(scope, ele, attrs) {
scope.includedSvgHtmlContent = $sce.trustAsHtml(attrs.includedSvg).$$unwrapTrustedValue();
}
]);
The value of attrs.includedSvg turns out to be '::installController.installUpdatesSvg' instead of 'xyzSvg';