How to call a angular 6 function from browser console?


How to call a angular 6 function from browser console?



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 Answer
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.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Render GeoTiff to on browser with leaflet

How to get chrome logged in user's email id through website

using states in a react-navigation without redux