4

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?

kokeksibir
  • 1,725
  • 2
  • 18
  • 30
  • Thank you @NewDev it has solved my problem. I think you should try to write down solution as answer, so that I can accept it as answer. – kokeksibir May 25 '15 at 19:49
  • 2
    It's not my answer, so I will just flag this question as a duplicate and encourage others to do the same and upvote the answer – New Dev May 25 '15 at 20:10

0 Answers0