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


Log in to reply