1. Make sure that the IIS service is turned on.
If not open, refer to http://jingyan.baidu.com/article/eb9f7b6d9e73d1869364e8d8.html
2. Compile the angular program ng build--prod--aot.
The Dist folder appears in the post-compilation project
3. Add a Web site to IIS
4. Add the Compiled Dist folder to the Web site
5. Install URL Rewrite Module
because The angular feature is not refreshed, so the URL to the browser address linked fields does not actually map to a specific location on the magnetic disc, so we need to install
: https://www.microsoft.com/en-us/download/details.aspx?id=47337 <https://www.microsoft.com/ en-us/download/details.aspx?id=47337>
6. Create a new Web. config file. The contents are as follows
<?xml version= "1.0" encoding= "UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name= "AngularJS" stopprocessing= "true" >
<match url= ". *"/>
<conditions logicalgrouping= "MatchAll" >
<add input= "{request_filename}" matchtype= "Isfile" negate= "true"/>
<add input= "{request_filename}" matchtype= "Isdirectory" negate= "true"/>
</conditions>
<action type= "Rewrite" url= "/project"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
7. If there is a resource file in the project you need to copy the resource file into dist
8. The simplest set of permissions for the Dist folder can be set to the following
Angular deploying to WINDOW10 IIS