如何从浏览器控制台调用angular 6函数? [英] How to call an angular 6 function from browser console?

查看:103
本文介绍了如何从浏览器控制台调用angular 6函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从浏览器控制台调用组件内部的函数. 我想要类似的内容 但等于角6.

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.

提前谢谢

推荐答案

是的,您可以通过以下方法进行检查..

Yes you can check by below method..

在您的Google Chrome浏览器控制台上,您可以在以下命令下运行

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>

您可以检查输出.

如果需要进一步澄清,请告诉我.

Do let me know if you need further clarification.

请检查参考以便更好地理解.

Please check reference for better understanding.

这篇关于如何从浏览器控制台调用angular 6函数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆