How to call an angular 6 function from browser console?

风流意气都作罢 提交于 2019-12-12 11:41:10

问题


I want to call a function that is inside a component from the browser console. I want something like this but equivalent to angular 6.

Thank you in advance


回答1:


Yes you can check by below method..

on your google chrome console, you can run below command

ng.probe($0).componentInstance.<name of function you want to run from component.ts file>

You can check the output.

Do let me know if you need further clarification.

Please check reference for better understanding.



来源:https://stackoverflow.com/questions/51164691/how-to-call-an-angular-6-function-from-browser-console

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!