1
我正在轉換Microsoft提供的SpaTemplate。這個模板是使用Asp.Net Core的Angular 2實現。核心是好的,除了我可以不關心使用它,它限制了我的一些代碼庫。所以考慮到這一點,我想使用Angular 2,但我想使用Asp.Net Core與.Net框架。將Angular SpaTemplate Core轉換爲Core .Net Framework
我創建了模板,然後是一個空白的.Net Core w/.Net Framework項目。
我一直在複製文件到空白項目,但仍然無法讓它運行。
複製:
- wwwroot的
- ClientApp
- 控制器
- 查看
- 的package.json
- webpack.config.js
- Startup.cs內容
我推出我的新項目時,出現此錯誤:
Exception: Call to Node module failed with error: Error: No ResourceLoader implementation has been provided. Can't read the url "app.component.html"
at Object.get (D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:60768:15)
at DirectiveNormalizer.module.exports.DirectiveNormalizer._fetch (D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:47872:45)
at DirectiveNormalizer.module.exports.DirectiveNormalizer.normalizeTemplateAsync (D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:47927:21)
at DirectiveNormalizer.module.exports.DirectiveNormalizer.normalizeTemplate (D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:47899:44)
at CompileMetadataResolver.module.exports.CompileMetadataResolver._loadDirectiveMetadata (D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:48830:75)
at D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:49026:54
at Array.forEach (native)
at CompileMetadataResolver.module.exports.CompileMetadataResolver.loadNgModuleDirectiveAndPipeMetadata (D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:49025:41)
at D:\Source\Susquehanna-Software\EarlyScTrackerDemos\NetFrameScTrackerDemo\ClientApp\dist\vendor.js:60221:58
at Array.forEach (native)
Microsoft.AspNetCore.NodeServices.HostingModels.HttpNodeInstance+<InvokeExportAsync>d__7.MoveNext()