1

My app will run encapsulated inside a cromium browser with chromiumfx.

chromiumfx are capable to execute any existing JS functions just like you operating a console.

I've this application...

 import { Component } from '@angular/core';
 import { GlobalService} from './global.service';
 import {Router} from "@angular/router";
 @Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
 })
 export class AppComponent {

  constructor(private gs: GlobalService, private router: Router) {

   }
  tst() {
    console.log('hello');
   }
 }

I need to execute tst() from the console to simulat an action from cromiumfx. Any help ?

1 Answer 1

4

In dev mode you can just write:

ng.probe($0).componentInstance.tst()

where $0 points to your component host element.

Ng-run Example

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.