Thanks for your reply.

I have modified the web.config following your suggestion, but it didn't 
work.
I have even added a second condition as illustrated in this article 
<https://github.com/angular/angular/issues/11046>:

<system.webServer>
  <rewrite>
    <rules>
      <rule name="Angular2" stopProcessing="true">
        <match url=".*" />
        <action type="Rewrite" url="/" />
        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate=
"true" />
      </rule>
    </rules>
  </rewrite>
</system.webServer>

 Unfortunately, I still get the same behavior... :(


Op dinsdag 17 januari 2017 15:59:25 UTC+1 schreef Will Huang:
>
> You may try this:
>
>     <system.webServer>
>         <rewrite>
>             <rules>
>                 <rule name="SPA" stopProcessing="true">
>                     <match url=".*" />
>                     <action type="Rewrite" url="/" />
>                     <conditions>
>                         <add input="{REQUEST_FILENAME}" matchType="IsFile" 
> negate="true" />
>                     </conditions>
>                 </rule>
>             </rules>
>         </rewrite>
>     </system.webServer>
>
>
>
>
>
> Mauro Ebert於 2017年1月17日星期二 UTC+8上午2時31分33秒寫道:
>>
>> 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!
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Angular" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to