Angularjs 使用html5模式并在路由中传递参数时,页面加载不起作用
在routeprovider中传递参数不会加载逐页刷新。 错误消息:意外的令牌Angularjs 使用html5模式并在路由中传递参数时,页面加载不起作用,angularjs,Angularjs,在routeprovider中传递参数不会加载逐页刷新。 错误消息:意外的令牌 .when("/test/:testid", { templateUrl: "Templates/test.html", controller: "testController"}) $locationProvider.html5Mode(true); have <base href="/" /> in he
.when("/test/:testid", {
templateUrl: "Templates/test.html",
controller: "testController"})
$locationProvider.html5Mode(true);
have <base href="/" /> in head section
in web.config i am using
<!--<rewrite>
<rules>
<rule name="RewriteRules" stopProcessing="true">
<match url =".*"/>
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true"/>
</conditions>
<action type="Rewrite" url="/"/>
</rule>
</rules>
</rewrite>-->