2017-10-10 2 views
0

IIS 8에서 각도 2 이상의 앱을 호스팅하고 있습니다. 모든 경로는 /mutual-funds/*로 시작하는 일부 경로를 제외하고 클라이언트 측 경로입니다. IIS가 해당 폴더를 가져오고 해당 인덱스 페이지를 사용하게하고 싶습니다. 규칙을 다시 작성했지만 다시로드 할 때 작동하지 않습니다. 모든 도움을 주시면 감사하겠습니다.각도 2+ 앱 IIS 호스팅 경로가 다시로드되지 않음

웹 설정 파일은 다음과 같습니다

<rule name="AngularJS Routes" stopProcessing="false"> 
     <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="/webapp/" /> 
    </rule> 





    <rule name="Check1" stopProcessing="false"> 
     <match url="/mutual-funds/"/> 
     <conditions logicalGrouping="MatchAll"> 
     <add input="{ REQUEST_FILENAME}" matchType="IsFile" negate="true" /> 
     <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> 
     </conditions> 
     <action type="Rewrite" url="/webapp/mutual-funds/" /> 
    </rule> 

답변

0

누군가가 응답이 있다면 나는 관심이있을 것입니다.

RouterModule.forRoot(routes, {useHash: true}) 

그것은 URL에 후 '#'을 추가합니다 : 당신이 라우터를 제공하는 곳

는 해결 방법으로 { useHash: true }를 추가 해시 위치 전략을 사용할 수 있습니다. 내가 HashLocationStratgey을 사용하지 않으 https://codecraft.tv/courses/angular/routing/routing-strategies/

+0

: 그럼 당신은 여기에 URL http://your-context/#mutual-funds

에 위치 전략에 대한 goot 기사를 당신의 페이지에 액세스 할 수 있습니다. –

관련 문제