使用服务器端 Blazor,我在导航菜单中有一个指向主页的链接:
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">Main</NavLink>
Run Code Online (Sandbox Code Playgroud)
使用https://localhost 时,它是活动的,使用https://localhost/#时,它不是活动的,而应用程序仍在主页上。我无法使用NavLinkMatch.Prefix,因为主链接将在每个页面上激活。
PS 我正在使用服务器端 Blazor 和 Google OAuth2。身份验证后,Google 会重定向到以 # 结尾的主页。此后主链接变为非活动状态。
ng build将文件导出到dist文件夹,如下所示
index.html
main.bundle.js
styles.bundle.js
...
Run Code Online (Sandbox Code Playgroud)
我希望脚本在子文件夹中
*index.html
scripts/main.bundle.js
scripts/styles.bundle.js
...*
Run Code Online (Sandbox Code Playgroud)
我该怎么做?
我正在尝试将URLRequest标头的Content-Type设置为"application/json".这是代码:
var request:URLRequest = new URLRequest("http://localhost");
request.contentType = "application/json; charset=UTF-8";
Run Code Online (Sandbox Code Playgroud)
但正如您在屏幕截图中看到的,Content-Type不在标题中:
http://screencast.com/t/vHxHbSUOFM
但它在请求正文中:
http://screencast.com/t/irB16taO
怎么做对了?
actionscript ×1
angular ×1
angular-cli ×1
asp.net-core ×1
blazor ×1
content-type ×1
json ×1
urlrequest ×1