Angular 角度ng探针:获取与注射器一起使用的标记的参考

Angular 角度ng探针:获取与注射器一起使用的标记的参考,angular,debugging,import,probe,Angular,Debugging,Import,Probe,我尝试在浏览器控制台中执行以下操作: ng.probe($('app-root')).injector.get(AuthenticationService) 这不起作用,因为找不到AuthenticationService令牌。在我的代码中,我会从'@lib'编写import{AuthenticationService}如何从控制台中的喷油器获取服务?您有没有想过这个问题?我也在试着做同样的事,你有没有想过?我也在试着做同样的事情。

我尝试在浏览器控制台中执行以下操作:

ng.probe($('app-root')).injector.get(AuthenticationService)

这不起作用,因为找不到
AuthenticationService
令牌。在我的代码中,我会从'@lib'编写
import{AuthenticationService}如何从控制台中的喷油器获取服务?

您有没有想过这个问题?我也在试着做同样的事,你有没有想过?我也在试着做同样的事情。