I use angular-leaflet-directiveto render maps and angular-chartto render diagrams in a project. Both libraries are very convenient if you do not want to include a legend for your diagrams.
In this case, to enable the legend for the directive, angular-chartyou definitely need to set the attribute legendto true. As soon as this is done, if the function is also enabled for the module angular-leaflet-directive, an error occurs because the leaflet module tries to compile its own directive and then complains about the lack of a controller leaflet.
Too bad there are angular-leaflet-directiveno prefix directives, as explained in angular docs. But that is not the point.
Is there a way to prevent compilation of a directive for such scenarios, what should a developer do if two different modules choose the same name for their directives?
source
share