Skip to content

rename index.html will lead that the app is not available #3748

Closed
@MienDev

Description

@MienDev

IMHO, the index file for the app is configurable, and a file named such as main.html can be used if the value for index in angular-cli.json is given.
however, rename index.html file will lead that the app is not available after I upgrade the angular-cli to beta.24. (while working well in beta.18)


OS?

windows 10

Versions.

angular-cli: 1.0.0-beta.24
node: 6.5.0
os: win32 x64
@angular/common: 2.4.1
@angular/compiler: 2.4.1
@angular/compiler-cli: 2.4.1
@angular/core: 2.4.1
@angular/forms: 2.4.1
@angular/http: 2.4.1
@angular/platform-browser: 2.4.1
@angular/platform-browser-dynamic: 2.4.1
@angular/platform-server: 2.4.1
@angular/router: 3.4.1

Repro steps.

  1. ng init ( npm install)
  2. rename file index.html to main.html
  3. change the value of index key to main.html
  4. ng serve (build ok)
  5. visit the default url (http://localhost:4200)
  "apps": [
    {
      "root": "src",
      "outDir": "dist",
      "assets": [
        "assets",
        "favicon.ico"
      ],
      "index": "main.html",
      "main": "main.ts",
      "test": "test.ts",
      "tsconfig": "tsconfig.json",
      "prefix": "app",
      "mobile": false,
      "styles": [
        "styles.css"
      ],
      "scripts": [],
      "environments": {
        "source": "environments/environment.ts",
        "dev": "environments/environment.ts",
        "prod": "environments/environment.prod.ts"
      }
    }
  ]

The log given by the failure.

page shows "Cannot GET /"
http status code is "404"

Mention any other details that might be useful.

when switch angular-cli to version beta.18, everything goes smoothly.


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