Javascript 传单:仅显示空白页

Javascript 传单:仅显示空白页,javascript,cordova,ionic,Javascript,Cordova,Ionic,我正在使用Cordova、Leaftlet和Ionic开发一个应用程序 以下是我在controllers.js中的代码: //map .controller('MapCtrl', function($scope, $rootScope, $state, $ionicNavBarDelegate, geolocation, notif) { // Change the title bar content $scope.viewTitle = "<img src='img/ma

我正在使用Cordova、Leaftlet和Ionic开发一个应用程序

以下是我在controllers.js中的代码:

//map
.controller('MapCtrl', function($scope, $rootScope, $state, $ionicNavBarDelegate, geolocation, notif) {
    // Change the title bar content
    $scope.viewTitle = "<img src='img/map.svg' class='nav-title-icon'/>Confirmer la position";

    $scope.initMap = function() {
        var map = new L.map('map');
        var osmURL = 'http://{s}.hide/hide/{z}/{x}/{y}.png';
        var osmAttrib = 'Map data © OpenStreetMap contributors';
        var osm = new L.TileLayer(osmUrl, { attribution: osmAttrib });

        map.setView(new L.LatLng(47.12, 01.13), 11);
        map.addLayer(osm);
    }
});
//映射
.controller('MapCtrl',function($scope、$rootScope、$state、$ionicNavBarDelegate、geolocation、notif){
//更改标题栏内容
$scope.viewTitle=“确认人la职位”;
$scope.initMap=函数(){
var map=新的L.map('map');
var osmURL='http://{s}.hide/hide/{z}/{x}/{y}.png';
var osmAttrib=‘地图数据©OpenStreetMap贡献者’;
var osm=新的L.TileLayer(osmUrl,{属性:osmAttrib});
赛特维尤地图(新L.LatLng(47.12,01.13),11);
map.addLayer(osm);
}
});
和我的地图状态html代码:

<ion-view title="MAP">
    <ion-nav-buttons side="right">
        <button class="button button-icon icon ion-checkmark-round stable" ng-click="confirmPosition()"></button> 
    </ion-nav-buttons>
    <ion-content>
        <div id="map"></div>
    </ion-content>
</ion-view>

当我使用
cordova Simulate ios
模拟我的应用程序时,它会显示一个空白页面,没有标题和绿色页脚

如果我将$scope.initMap=function()放在注释上,它将显示一个空白页面,其中有我的蓝色页眉和标题(没有绿色页脚)

这是我第一次与js、cordova和ionic合作。你能给我一些提示吗

谢谢大家!