// grab the component instance of the DOM element stored in $0
let myComp = ng.getComponent($0);
// or
let myComp = ng.getOwningComponent($0)
// interact with the component's API
myComp.toggle();
// trigger change detection on the component
ng.applyChanges(myComp);
https://angular.io/guide/devtools