You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run ng serve from the command line in the Angular application
Open up the dev console and look for the files in the Sources tab OR set up a service to make a HTTP request to the file path you expect the static file to be at
A 404 will occur
The log given by the failure.
N/A
Desired functionality.
Would like to be able to access static files within the Angular application.
Mention any other details that might be useful.
When building out an Angular v2 application (when Angular CLI was still in beta release) I was able to serve static text files inside of my /app directory and get them with Http.get('app/example-dir/test-file.json') from @angular/http
The text was updated successfully, but these errors were encountered:
Bug Report or Feature Request (mark with an
x
)Versions.
$ ng --version
@angular/cli: 1.0.1
node: 6.9.1
os: win32 x64
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0
Repro steps.
ng serve
from the command line in the Angular applicationThe log given by the failure.
N/A
Desired functionality.
Would like to be able to access static files within the Angular application.
Mention any other details that might be useful.
When building out an Angular v2 application (when Angular CLI was still in beta release) I was able to serve static text files inside of my /app directory and get them with Http.get('app/example-dir/test-file.json') from @angular/http
The text was updated successfully, but these errors were encountered: