Thibault Thibault - 1 year ago 145
AngularJS Question

Angular NgRoute and leaflet declaration directive

I'm pretty new to Angular, and I'm trying to make a little app for learning.

I use the leaflet directive and want to add the

directive too but I have some errors in the console.

Here is my code :

var app = angular.module('demoapp', ['leaflet-directive'], ['ngRoute']);
app.controller("toulouseController", [ '$scope', '$http', function($scope, $http) {
angular.extend($scope, {
osloCenter: {},
markers: {},
defaults: {
scrollWheelZoom: false

I don't know if I can't declare two directive at the same time...

Thanks for your help!

Answer Source

Try this: var app = angular.module('demoapp', ['leaflet-directive', 'ngRoute']); That should work.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download