使用Router(this.router.url
)时/MyRouterName?type=abc
,/MyRouterName
如果没有参数,我会得到字符串
我是否只能/MyRouterName
从完整的URL 获取路径(对于所有情况)?
当我添加一个库(在我的情况下jplayer
),我得到了错误
外部"vendor_d73928c ...":1未捕获的ReferenceError:vendor_d73928c989153b363873未定义
在行
module.exports = vendor_d73928c989153b363873
文件webpack:///external "vendor_d73928c989153b363873"
这是我的代码(添加供应商jplayer
).
entry: {
vendor: [
'bootstrap',
'bootstrap/dist/css/bootstrap.css',
'font-awesome/css/font-awesome.css',
'style-loader',
'jquery',
'@angular/common',
'@angular/compiler',
'@angular/core',
'@angular/http',
'@angular/platform-browser',
'@angular/platform-browser-dynamic',
'@angular/router',
'@angular/platform-server',
'angular2-google-maps/core',
'jplayer'
]
},
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?
我使用"aspnet-spa"生成器(http://blog.stevensanderson.com/2016/05/02/angular2-react-knockout-apps-on-aspnet-core/)来生成项目.它在本地运行成功,但我在服务器IIS中返回错误.
An unhandled exception occurred while processing the request.
Win32Exception: The system cannot find the file specified
StartCore
> System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at Microsoft.AspNetCore.NodeServices.OutOfProcessNodeInstance.<EnsureReady>d__16.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.NodeServices.HttpNodeInstance.<Invoke>d__7`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at …
Run Code Online (Sandbox Code Playgroud)