GET: angular2-google-maps/core 404 (Not Found)
See original GitHub issueIssue description
Error in browser console and angular2 app not working after adding angular2-google-maps:
GET http://localhost:4200/angular2-google-maps/core 404 (Not Found)
However ng serve
does not give any error. (I am using Angular CLI ng
)
Steps to reproduce and a minimal demo of the problem
Addding the following line to src/main.ts:
import {GOOGLE_MAPS_PROVIDERS} from 'angular2-google-maps/core'; // Change 1
And then bootstrapping App with GOOGLE_MAPS_PROVIDERS
bootstrap(AppComponent, [
..,
HTTP_PROVIDERS,
GOOGLE_MAPS_PROVIDERS, // Change 2
..,
])
Making these changes to an already functioning app is causing the error.
Current behavior
Giving an error (in browser console)
zone.js:101 GET http://localhost:4200/angular2-google-maps/core 404 (Not Found)
Angular app is not working (stuck at loading…)
Expected/desired behavior
I’d expect to see no error in console and that app works properly.
angular2 & angular2-google-maps version
Angular: 2.0.0-rc.4 Maps: 0.12.0
Other information
Some of the relevant npm dependencies and their versions:
"@angular/common": "^2.0.0-rc.4",
"@angular/compiler": "^2.0.0-rc.4",
"@angular/core": "^2.0.0-rc.4",
"@angular/forms": "^0.1.1",
"@angular/http": "^2.0.0-rc.4",
"@angular/platform-browser": "^2.0.0-rc.4",
"@angular/platform-browser-dynamic": "^2.0.0-rc.4",
"@angular/router": "3.0.0-alpha.7",
Issue Analytics
- State:
- Created 7 years ago
- Comments:5
Top GitHub Comments
@yanqui92
Looks like a bug here. I solved it with the following code and it works perfectly. Just comment out the suggested line in the docs and add another line to load the package from a CDN.
Hi, after change the map, i am getting:
can you help me to fix this? thanks