如何在剃须刀页面中使用bootstrap js
我想在我的 index.razor 中做一个bootstrap旋转木马,因为在文档它说:不在剃须刀组件文件(.RAZOR)中放置标签,因为Blazor无法动态更新标签。,但我需要<< Strong> Bootstrap JS 使我的轮播工作。如何使用Bootstrap JS cdn或将其保存在文件中?
我还看到了这个 post post &lt; script&gt;
标签。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您共享的帖子不使用.razor文件中的
&lt; script&gt;
标记。而且我认为您没有完全阅读该文档,请仔细阅读以下doc 。假设您使用ASP.NET 6 Blazor Server应用程序,可以按照以下步骤操作:
1.ADD JS文件
_Layout.cshtml
:You shared post does not use
<script>
tag in .razor file. And I think you do not read the document entirely, pls read carefully for the following doc.Assume that you use ASP.NET 6 Blazor Server app, you could follow the steps:
1.Add js file in
_Layout.cshtml
:2.Modify your
Index.razor
:Update:
After checking your repo, your
_Host.cshtml
is not correct, it should be: