有誰知道如何將谷歌地圖添加到角2應用程序?有誰知道如何將谷歌地圖添加到角2應用程序?
我目前鏈接到它在我的index.html頁,像這樣:
<script src="node_modules/angular2-google-maps/bundles/angular2-google-maps.js"></script>
但在我的角度2組件使用它時,我得到這個控制檯錯誤:
system.src。 JS:1061 GET http://localhost:3000/angular2-google-maps/core 404(未找到)
這是我的控制檯的屏幕截圖:
系統配置:
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
'angular2-google-maps': { defaultExtension: 'js' }
}
});
System.import('app/boot')
.then(null, console.error.bind(console));
你配置了systemjs嗎? – dfsq
你好,我已經在 – AngularM