Google maps Google地图未加载到角路由中

Google maps Google地图未加载到角路由中,google-maps,angular,angular-routing,Google Maps,Angular,Angular Routing,我在index.php和contact.php中使用角度路由。我使用谷歌地图,所以当我导航到contact.php时,谷歌地图不会显示,但当按下ctrl+f5刷新时,页面地图会显示,我不知道我哪里做错了,因为控制台日志中没有显示错误。请帮帮我 这是我的路由和重定向代码。两者都不起作用。提前谢谢 var app = angular.module("myApp", ["ngRoute"]); app.config(function($routeProvider) { $routeProvider .

我在index.php和contact.php中使用角度路由。我使用谷歌地图,所以当我导航到contact.php时,谷歌地图不会显示,但当按下ctrl+f5刷新时,页面地图会显示,我不知道我哪里做错了,因为控制台日志中没有显示错误。请帮帮我

这是我的路由和重定向代码。两者都不起作用。提前谢谢

var app = angular.module("myApp", ["ngRoute"]);
app.config(function($routeProvider) {
$routeProvider
.when("/", {
    templateUrl : "home.php"
})
.when("/about", {
    templateUrl : "about.php"
})
.when("/contact", {
    templateUrl : "contact.php"
})
.when("/mission", {
    templateUrl : "mission.php"
})
.when("/leadership", {
    templateUrl : "leadership.php"
})
.when("/product", {
    templateUrl : "product.php"
}).otherwise({redirectTo:'/'});
});
下面是我的contact.php页面代码

<div class="margin-bottom-90 fix">              
            <div class="col-sm-6">
                <div id="contact-map"></div>
            </div>          

            <div class="contact-form col-sm-6 ">
                <h2>contact form</h2>
                <form action="#">
                    <div class="input-box transparent"><input type="text" name="name" placeholder="Name*"></div>
                    <div class="input-box transparent"><input type="text" name="email" placeholder="Email*"></div>
                    <div class="input-box transparent"><input type="text" name="subject" placeholder="Subject"></div>
                    <div class="input-box transparent"><textarea placeholder="Message" name="message"></textarea></div>
                    <div class="input-box submit-box width-full"><input type="submit" value="send" class="button large"></div>
                </form>
            </div>      
        </div>

联系方式

在angular controller中使用谷歌地图,我自己解决的可能重复问题