Description
This is a feature request.
TL;DR; As a full-stack developer, I want to be able to rename the file extension of the generated HTML file in
dist
folder, so I can easily integrate it into my server-side project.
Right now (beta-15), I can rename the source HTML file in angular-cli.json
using the index
property, but the output file in dist
is still called index.html
.
I don't care whether the implementation chooses to carry the name forward from the index
property, or introduce another property for it.
Use Case:
I need to use this inside an ASP .NET MVC application (.NET 4.5 not .NET Core).
My plan is to:
- Include the folder as sub-folder in the project, called say
client
. - Set redirects in the root server-side project to go to
client/dist
when it's not matching files / folders or APIs - Run
ng build --watch
for dev, while IIS is looking at my parent server-side project folder
But I may well end up needing a legacy layout file, and some other server-side code to run before returning the HTML file, so my plan is to have a root server-side rout + MVC controller that returns the HTML file, using the Razor template engine (a .cshtml
file, like Views/Home/Index.cshtml
), which will still have the layout.
But I still want Webpack to generate the script
tag etc. So, I want to:
- strip everything from the CLI project
index.html
file - Include the generated file, which only has the generated
script
tag etc, in the server-sideIndex.cshtml
file.
But to include it in my server template, it's way easier for me if its extension was cshtml
not html
. It's doable without that, but it's too much config, and part of this is showing the guys here how super easy it is to include Angular 2 seamlessly.
P.S.
Sorry if this sounds like a very complex scenario, I believe it really isn't, and it's awesome to have something like this to integrate Angular 2 with server-side frameworks; and the change -I hope- isn't a big one really to support this.
Thanks a lot for creating such an awesome starter that makes developing Angular 2 much easier, and making it available for everyone for free, while you definitely do not have to, and owe nothing to any of us.