有谁知道如何将谷歌地图添加到角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