Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
Controller 'leaflet', required by directive 'center'
-
index.html
<link rel="stylesheet" href="lib/onsen/css/onsenui.css" /> <link rel="stylesheet" href="lib/onsen/css/onsen-css-components.min.css" /> <link rel="stylesheet" href="lib/onsen/js/angular/angular-csp.css" /> <link rel="stylesheet" href="css/leaflet.css" /> <script src="js/leaflet.js"></script> <script src="lib/onsen/js/angular/angular.min.js"></script> <script src="lib/angular-sanitize/angular-sanitize.min.js"></script> <script src="lib/onsen/js/onsenui.min.js"></script> <script src="lib/onsen/js/angular-onsenui.min.js"></script> <script src="js/angular-leaflet-directive.js"></script>
…
…<leaflet defaults="defaults" markers="markers" lf-center="puntoCentral" height="{{innerheight}}px" width="100%"></leaflet> or <leaflet defaults="defaults" markers="markers" center="puntoCentral" height="{{innerheight}}px" width="100%"></leaflet>
it works perfectly on onsenui 2.4.2 but 2.5.x dosn’t work
“
Error: $compile:ctreq Missing Required Controller
Controller ‘leaflet’, required by directive ‘center’, can’t be found!
”thanks in advance
-
I deleted ‘center’ from the line :
angular-leaflet-directive.js:var centerDirectiveTypes = [‘center’, ‘lfCenter’];