assets are pulled in from angular.json, but not served?
See original GitHub issueI added src/api
to my assets for an angular app. Stackblit pulled them in, but when I try to access the files via http in angular, i get an error. It returns a status code of 200 as it brings in the index.html
.
"assets": [
"src/api",
"src/favicon.ico",
"src/assets"
],
I am trying to hit it with code like this:
getCharacters(storyId: number) {
return this.http
.get('api/characters.json')
.map((response: Response) => response.json().data);
}
How can I add a folder like this?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Exclude assets in production build - angular
ng serve should serve files contained in the folder ./assets-non-build. but: ng build should not inculde the folder ./assets-non-build in the ...
Read more >Angular workspace configuration
The angular.json file at the root level of an Angular workspace provides workspace-wide and project-specific configuration defaults.
Read more >Angular CLI: Different ways to include assets - Łukasz Nojek
In this article I will discuss several methods of adding and referring to static files in an Angular CLI application – may they...
Read more >Build & Serve 3rd party Assets and Static files — Angular
Let's go to angular.json and add the glob section to ensure the assets are copied over during build(either on pipeline or for local...
Read more >single-spa-angular
Note that the schematics for Angular 7 use an Angular Builder that is no ... Add build:single-spa and serve:single-spa to the scripts in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates on the topic ? this is a real pain that will prevent more and more users from using stackblitz no ?
I seem to be running into this as well, is this not fixed?