报错处理之 -- 关于RangeError: Maximum call stack size exceeded: 最大调用堆栈大小超出
Opened this issue · 0 comments
deepthan commented
core.es5.js:1020 ERROR Error: Uncaught (in promise): RangeError: Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.preloadConfig (vendor.bundle.js:1)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5802)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.preloadConfig (vendor.bundle.js:1)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5802)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5806)
at RouterPreloader.webpackJsonp.../../../router/@angular/router.es5.js.RouterPreloader.processRoutes (router.es5.js:5798)
at resolvePromise (zone.js:824)
at zone.js:876
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425)
at Object.onInvokeTask (core.es5.js:3881)
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:424)
at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runTask (zone.js:192)
at drainMicroTaskQueue (zone.js:602)
at <anonymous>
解决办法: 是不是路由没有在模块里面引入
import { PreviewLoadRouting } from './preview-load.routing';
@NgModule({
imports: [
...
RouterModule.forChild(PreviewLoadRouting) // 这里要引入,不然会报这个错误
]
})