Description
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.
- ng init ( npm install)
- rename file
index.html
tomain.html
- change the value of
index
key tomain.html
- ng serve (build ok)
- 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.