I am using angular-leaflet-directive
for rendering map and angular-chart
for rendering charts in a project. Both are very handy libraries unless you want to enable legend for your charts.
In this case, to enable legend for angular-chart
directive, you definitely need to set legend
attribute to true
. Once it is done if angular-leaflet-directive
is also enabled for the module, error occurs since leaflet module tries to compile its own directive, then complains about missing leaflet
controller.
It is a pity that angular-leaflet-directive
has not prefixed its directives, as it is explained in angular docs. But it is not the main concern.
Is there any method to prevent a directive to be compiled for similar scenarios, what should a developer do, if its two different modules has picked same name for their directives?