Hello everybody,
I'm new to Angular 2 and interested in eventually consider adopting it for my company's web development projects, so I decided to have a look at its capabilities by following the Tour of Heroes tutorial.
I have used the instructions provided in Cookbook > VS 2015 QuickStart to set up the project and add the quickstart-master files.
Everything worked fine until I had to perform the steps in 6. Routing (as warned in the instructions at the end of the project setup).
After following the steps to add the router outlet and link in the code, the tutorial app shows the message hard-coded in index.html ("Loading AppComponent content here ..."), instead of the app component html.
In order to solve the issue, I then added a rewrite rule into my web.config, which contains the following:
<system.webServer>
<rewrite>
<rules>
<rule name="Angular2" stopProcessing="true">
<match url=".*" />
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
</system.webServer>
Unfortunately, this apparently doesn't help (has no effect) in getting the expected behavior back.
I'd truly appreciate if someone with (some) more knowledge could shed some light on the problem, what I am possibly doing wrong and its actual solution.
Thank you in advance!