Skip to content

support loading dist/index.html from filesystem? #1231

@guidorice

Description

@guidorice

I noticed that the dist/ project can be loaded by HTTP, e.g. if I do: python -m http.server, and then browsing to http://localhost:8000. However, if I just double click on dist/index.html in my browser, it fails with 404 not founds for the resources:

file:///vendor/es6-shim/es6-shim.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///vendor/reflect-metadata/Reflect.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///vendor/systemjs/dist/system.src.js Failed to load resource: net::ERR_FILE_NOT_FOUND
file:///vendor/zone.js/dist/zone.js Failed to load resource: net::ERR_FILE_NOT_FOUND
index.html:21 Uncaught ReferenceError: System is not defined
file:///favicon.ico Failed to load resource: net::ERR_FILE_NOT_FOUND

Loading an app from the filesystem is a nice feature to have (also is what my boss prefers to do, to see demos, rather than messing about with http servers and installing stuff via npm, and so forth).

OSX 10.9.5

ng --version
angular-cli: 1.0.0-beta.8
node: 6.2.2
os: darwin x64

I was just doing a bare-bones test of the tool like this:

ng new PROJECT_NAME
cd PROJECT_NAME
ng serve
ng dist -prod

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions