小编Pha*_*hân的帖子

如何从完整的url字符串中获取唯一的路径

使用Router(this.router.url)时/MyRouterName?type=abc,/MyRouterName如果没有参数,我会得到字符串

我是否只能/MyRouterName从完整的URL 获取路径(对于所有情况)?

angular2-routing

22
推荐指数
4
解决办法
5万
查看次数

Angular 2,Webpack Uncaught ReferenceError:vendor ...在添加外部库时未定义

当我添加一个库(在我的情况下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)

我错过了什么吗?

jplayer webpack angular

6
推荐指数
1
解决办法
5051
查看次数

无法在服务器上运行asp.net核心,角度2,服务器端渲染项目

我使用"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)

server-side-rendering asp.net-core angular

1
推荐指数
1
解决办法
4046
查看次数