title: How can I get component's method real name?
body: <p><code>for clarify next part: payU is the Internet payment operator</code></p>
  
  <p>I have a serious problem with integration my Angular app with payU payments. I won't store or pass credit card's data (security reasons) so I choose widget.</p>
  
  <p>The first problem is how to place the widget in the code. Documentation says that I should place script in the following way: </p>
  
  <pre><code>&lt;script
      src="https://secure.payu.com/front/widget/js/payu-bootstrap.js"
      pay-button="#pay-button"
      merchant-pos-id="145227"
      shop-name="Nazwa sklepu"
      total-amount="9.99"
      currency-code="USD"
      success-callback="test"
      sig="250f5f53e465777b6fefb04f171a21b598ccceb2899fc9f229604ad529c69532"&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>How you probably know, you can't set script in your code in this way in Angular so I decided use little walkaround: </p>
  
  <pre><code>    ngAfterViewInit(): void {
          this.script = document.createElement('script');
          this.script.setAttribute('src', 'https://secure.payu.com/front/widget/js/payu-bootstrap.js');
          this.script.setAttribute('pay-button', '#pay-button');
          this.script.setAttribute('merchant-pos-id', '145227');
          this.script.setAttribute('total-amount', '9.99');
          this.script.setAttribute('currency-code', 'USD');
          this.script.setAttribute('success-callback', 'test');
          this.script.setAttribute('sig', '4752ce2b163684a9c27cc0923ad46068c04da5d34329f5669ce73dcf96394558');
          this.renderer.appendChild(this.el.nativeElement, this.script);
      }
  </code></pre>
  
  <p>I know it's not a perfect solution (if you know better way to do this, please let me know in comment.</p>
  
  <p>But the main problem is pass name of callback function to <code>success-callback</code> attribute. I prepared function in my component, like: </p>
  
  <pre><code>    test(arg: any) {
          console.log(arg);
      }
  </code></pre>
  
  <p>But I can't get this name. I was trying:</p>
  
  <p><code>this.script.setAttribute('success-callback', this.test.name);</code></p>
  
  <p>but property name is empty. Is there a simple way to get real name of method (after typescipt translating) in my component?</p>
  
  <p>BTW. </p>
  
  <p>Adding simple js script to index.html and providing its name works, but i need to call service within my function. </p>
  
  <p>I'm using Angular v7.</p>