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.

Thank you in advance

Kimy BF
  • 1,029
  • 3
  • 13
  • 23

1 Answers1

6

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.

Flutterian
  • 1,761
  • 1
  • 21
  • 47