angular-seed: angular-in-memory-web-api not working
[x] bug report => search github for a similar issue or PR before submitting
Current behavior Implementing angular-in-memory-web-api just returns the application homepage instead of the data that is expected.
Minimal reproduction of the problem with instructions
in project.config.ts
this.SYSTEM_CONFIG_DEV.paths['angular-in-memory-web-api'] '${this.APP_BASE}node_modules/angular-in-memory-web-api/bundles/in-memory-web-api.umd';
I took my configuration and reproduced it with the angular2-quickstart project and angular-in-memory-web-api works as expected. Browser “sources” doesn’t seem to indicate a path problem but the network XHR responses indicates I am getting the entire page as a response.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 19 (3 by maintainers)
Got it working!!!
The project.config needed another line adding:
Using “core.umd.js” didn’t work during the production build. Changing it to ‘index.js’ works fine.
@mgechev @elemental21 Its definitely something to do with the module.
It looks like the module is having trouble fetching the angular2-google-maps. Its strange because it works fine locally using npm run start. Then when I do a build.prod the build breaks because it can’t find the node module.
In my above code I’ve followed this: http://plnkr.co/edit/YX7W20?p=preview
And in the project.config I have this:
Error I get is:
@elemental21 @mgechev I’ve added your code from above.
I get the same error
@elemental21 Thank you for your help above. I tried a few of those things but still no luck.
This is how I’ve tried to add angular2-google-maps:
This is my seed.config:
This is my project.config:
This is the error I get:
This is my node modules file structure for angular2-google-maps:
@elemental21 How did you get your third party library added? Could you share your app module file and your seed.config file please ?
I’m struggling to add angular2-google-maps.
This is the issue I made: Really struggling to add angular-google-maps to the build.prod #1592
I’m having trouble getting it in the build.prod and therefore its breaking my build to prod preventing me from releasing. However, My product relies on angular-google-maps.
I’ve npm install the node module and got it working locally using npm run start which is pointing to serve.dev
Any help would be great!
Most likely the issue is related to misconfiguration of the
angular-in-memory-web-api
bundle.I’ll take a look at it later today and share with you what I found.