我在服务器端blazor项目中使用MatBlazor 2.6.0。我做了以下步骤:
@Using MatBlazor中,中
当我运行这个项目时,我会得到一个错误:
Microsoft.JSInterop.JSException: Could not find 'matBlazor' in 'window'.当我检查浏览器中的视图源时,我看到有一个引用:
<script src="_content/MatBlazor/dist/matBlazor.js"></script>但是,当我检查那个.js文件的内容时,它是空的,知道我在这里做了什么错误吗?
发布于 2020-08-27 18:27:53
如果您的_Host.cshtml头部如下所示:
<head>
...
<!--MatBlazor-->
<script src="_content/MatBlazor/dist/matBlazor.js"></script>
<link href="_content/MatBlazor/dist/matBlazor.css" rel="stylesheet" />
...
</head>那么,问题可能在于如何将其添加到项目中。您在Visual中使用过Nuget包管理器吗?我同意这份文件是空的,真奇怪。
https://stackoverflow.com/questions/63152988
复制相似问题