I have created simple directive with a few parameters passed, but my parameters are not passed to Template from Usage code. (they are not displayed on page, no error is displayed too). I also used '@' instead of '=' but there was no real improvement.
I just want to display my attribute parameters in my directive code:). Thanks for help.
Usage code:
<fine-faulty-directive fineCount='111' finePercentage='11'
faultCount='222' faultPercentage='11'></fine-faulty-directive>
Directive code:
Application.Directives.directive('fineFaultyDirective', function () {
return {
restrict: 'E',
templateUrl: 'src/Dashboard/Views/fine_faulty.html',
//replace: true,
scope: {
fineCount: '=',
finePercentage: '=',
fauntCount: '=',
faultPercentage: '='
},
link: function (scope, elem, attrs) {
console.log(scope);
}
};
});
Simple templateURL:
{{faultPercentage}}% - {{faultCount}}