【问题标题】:How to use Kendo for Angular 2 in a Visual Studio 2015 Asp.Net Core SPA如何在 Visual Studio 2015 Asp.Net Core SPA 中使用 Kendo for Angular 2
【发布时间】:2017-02-05 22:21:51
【问题描述】:

我用 Template 搭建了一个新的 Asp.net Core Angular 2 SPA,现在想评估 Kendo 的 ng2,但我失败了。尤其是当我导入 GridModule 时,我会遇到无法表达的异常。

如何在 VS2015 项目中开始使用 Kendo for ng2?

安装Nodenpm版本:

C:\Windows\system32>node -v v6.9.4

C:\Windows\system32>npm -v 4.1.2

例外

处理请求时发生未处理的异常。

异常:调用节点模块失败并出现错误:预渲染失败 由于错误:错误:找不到模块 'C:\dev\ASP.NET-CORE\aspnetcore-k2-master\ClientApp\dist\main-server' 在 Function.Module._resolveFilename (module.js:469:15)

完整的Stacktrace 在这里。

当我在启动时在 Web UI 中遇到该异常时,我遵循了 Kendo Grid 记录。

注意Kendo Button 入门指南工作正常!

提前感谢您的宝贵支持

【问题讨论】:

    标签: visual-studio-2015 asp.net-core kendo-ui-angular2


    【解决方案1】:

    这可能与您使用的入门包有关,而不是与剑道网格有关。我正在使用相同的启动器。当包含新的供应商文件(如 Kendo)时,您必须确保通过运行以下命令重新生成供应商文件:

    webpack --config webpack.config.vendor.js
    

    您可以在 Steve Sanderson 的博客上找到更多文档:

    http://blog.stevensanderson.com/2016/10/04/angular2-template-for-visual-studio/

    如果这不能解决问题,这里有关于这个主题的讨论:

    https://github.com/aspnet/JavaScriptServices/issues/363

    【讨论】:

    • 我再次按照该教程进行操作:developer.telerik.com/products/kendo-ui/…。一开始我得到了 Exception: Module not found: Error: Cannot resolve module '@progress/kendo-angular-intl' 。我在 package.json 中添加了那个包“@progress/kendo-angular-intl”:“*”。现在我得到了异常:异常:调用节点模块失败并出现错误:TypeError:ctorParameters.map 不是 ReflectionCapabilities.parameters 的函数(C:\Source\VSTS\AspNet.Core.Playground\TruckerWebApp\node_modules\@angular\核心\捆绑\core.umd.js:2118:51)
    • 你是按照我上面提到的添加kendo包后重新生成vendor.js文件还是看我上面列出的讨论?
    • 我做到了。我给你发了一封电子邮件
    猜你喜欢
    • 2017-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-09
    相关资源
    最近更新 更多