如何从浏览器控制台日志中查找错误来源?
How to find the source of the error from browser console log?
我的 Web 应用程序中存在路由错误,该错误显示在我的浏览器控制台的屏幕截图中。我如何从这个错误日志中判断这个调用在哪个文件和哪一行?
查看路由情况的一种方法是打开路由跟踪。我这里有一个例子:https://github.com/DeborahK/Angular-Routing
RouterModule.forRoot([
{ path: 'welcome', component: WelcomeComponent },
{ path: '', redirectTo: 'welcome', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent }
], { enableTracing: true })
我的 Web 应用程序中存在路由错误,该错误显示在我的浏览器控制台的屏幕截图中。我如何从这个错误日志中判断这个调用在哪个文件和哪一行?
查看路由情况的一种方法是打开路由跟踪。我这里有一个例子:https://github.com/DeborahK/Angular-Routing
RouterModule.forRoot([
{ path: 'welcome', component: WelcomeComponent },
{ path: '', redirectTo: 'welcome', pathMatch: 'full' },
{ path: '**', component: PageNotFoundComponent }
], { enableTracing: true })