更新1:
从路由中删除组件后,现在应用程序正在为其他组件运行,但是如果我们从浏览器中的另一个组件返回到该播放器组件,我将收到以下错误
VM30741:34 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'PlayerManagement'
at resolvePromise (zone.js:418)
at resolvePromise (zone.js:403)
at zone.js:451
at ZoneDelegate.invokeTask (zone.js:225)
at Object.onInvokeTask (core.js:4943)
at ZoneDelegate.invokeTask (zone.js:224)
at Zone.runTask (zone.js:125)
at drainMicroTaskQueue (zone.js:357)
at HTMLAnchorElement.ZoneTask.invoke (zone.js:297)
TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at console.window.console.error (<anonymous>:36:101)
at defaultErrorLogger (core.js:1659)
at ErrorHandler.handleError (core.js:1720)
at Object.next (core.js:5700)
at SafeSubscriber.schedulerFn [as _next] (core.js:4538)
at SafeSubscriber.__tryOrUnsub (Subscriber.js:239)
at SafeSubscriber.next (Subscriber.js:186)
at Subscriber._next (Subscriber.js:126)
at Subscriber.next (Subscriber.js:90)
app.routing.ts https://hastebin.com/ufetoxozon.js
的package.json https://hastebin.com/adatojuput.json
<!-- language-all: lang-or-tag-here -->
VM3365:34 Unhandled Promise rejection: Invalid configuration of route 'PlayerManagement/PlayerMain/:id/': redirectTo and component cannot be used together ; Zone: <root> ; Task: Promise.then ; Value: Error: Invalid configuration of route 'PlayerManagement/PlayerMain/:id/': redirectTo and component cannot be used together
at validateNode (router.js:757)
at validateConfig (router.js:729)
at validateNode (router.js:779)
at validateConfig (router.js:729)
at validateNode (router.js:779)
at validateConfig (router.js:729)
at Router.resetConfig (router.js:4958)
at new Router (router.js:4820)
at setupRouter (router.js:7305)
at _callFactory (core.js:11128) Error: Invalid configuration of route 'PlayerManagement/PlayerMain/:id/': redirectTo and component cannot be used together
at validateNode (webpack:///./node_modules/@angular/router/esm5/router.js?:757:15)
at validateConfig (webpack:///./node_modules/@angular/router/esm5/router.js?:729:9)
at validateNode (webpack:///./node_modules/@angular/router/esm5/router.js?:779:9)
at validateConfig (webpack:///./node_modules/@angular/router/esm5/router.js?:729:9)
at validateNode (webpack:///./node_modules/@angular/router/esm5/router.js?:779:9)
at validateConfig (webpack:///./node_modules/@angular/router/esm5/router.js?:729:9)
at Router.resetConfig (webpack:///./node_modules/@angular/router/esm5/router.js?:4958:9)
at new Router (webpack:///./node_modules/@angular/router/esm5/router.js?:4820:14)
at setupRouter (webpack:///./node_modules/@angular/router/esm5/router.js?:7305:35)
at _callFactory (webpack:///./node_modules/@angular/core/esm5/core.js?:11128:28)
Error: Uncaught (in promise): Error: Invalid configuration of route 'PlayerManagement/PlayerMain/:id/': redirectTo and component cannot be used together
at resolvePromise (zone.js:418)
at zone.js:454
at ZoneDelegate.invokeTask (zone.js:225)
at Zone.runTask (zone.js:125)
at drainMicroTaskQueue (zone.js:357)
at XMLHttpRequest.ZoneTask.invoke (zone.js:297)
VM3365:36 Uncaught TypeError: Converting circular structure to JSON
at JSON.stringify (<anonymous>)
at console.window.console.error (<anonymous>:36:101)
at consoleError (zone.js:346)
at _loop_1 (zone.js:371)
at drainMicroTaskQueue (zone.js:375)
at XMLHttpRequest.ZoneTask.invoke (zone.js:297)