小编And*_*rey的帖子

如何使用 NavLinkMatch.All 激活 NavLink,并在末尾添加井号

使用服务器端 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 会重定向到以 # 结尾的主页。此后主链接变为非活动状态。

asp.net-core blazor

6
推荐指数
0
解决办法
5611
查看次数

'ng build'将脚本移动到子文件夹

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)

我该怎么做?

angular-cli angular

5
推荐指数
1
解决办法
4636
查看次数

无法在as3中为URLRequest设置"Content-Type"

我正在尝试将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

怎么做对了?

json actionscript content-type urlrequest actionscript-3

2
推荐指数
1
解决办法
8465
查看次数