angular-leaflet-directive
angular-leaflet-directive copied to clipboard
Attribute directives apply for everything in an application
Hello!
I think it was supposed that all inner attribute directives would apply only to a parent <leaflet> element directive, but they are invoked everywhere, e.g. in angular-google-maps directive (which causes the following error: Controller 'leaflet', required by directive 'center', can't be found!). As a workaround, I deleted 'center' from the line 3365:
var centerDirectiveTypes = ['center', 'lfCenter'];
but I think it's better to find a way to prevent invoking constructors for all such directives if an element is not a <leaflet>.
I am also seeing this error when I am using angular-google-maps directive.
I thought this was fixed in #914 with the alternative lf-center by @nmccready ?
EDIT: I too am having the same problem. Not so sure if the problem is related to the issue I stated above.
@st04 when I did what @leitasat suggested above...it worked for me...so the issue still exists.
+1 This is also a issue when using 'bounds'. It clashes with google maps as well angular.js:13550 Error: [$compile:ctreq] Controller 'leaflet', required by directive 'bounds', can't be found!