title: Social sign-in buttons not rendered inside component, Angular 2
body: <p>I'm pretty new to Angular 2 and am trying to get some simple sign-in buttons to work inside one of my child-components. </p>
  
  <p>This is the order of the scripts rendered:</p>
  
  <pre><code> &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Title&lt;/title&gt;
      &lt;meta name="google-signin-client_id" content="xxxxxxx.apps.googleusercontent.com"&gt;
  
      &lt;script src="node_modules/es6-shim/es6-shim.min.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/systemjs/dist/system-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/angular2/es6/dev/src/testing/shims_for_IE.js"&gt;&lt;/script&gt;
  
      &lt;script src="node_modules/angular2/bundles/angular2-polyfills.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/systemjs/dist/system.src.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/rxjs/bundles/Rx.js"&gt;&lt;/script&gt;
      &lt;script src="node_modules/angular2/bundles/angular2.dev.js"&gt;&lt;/script&gt;
  
      &lt;script src="https://apis.google.com/js/platform.js" async defer&gt;&lt;/script&gt;
  
      &lt;script&gt;
        System.config({
          packages: {
            app: {
              format: 'register',
              defaultExtension: 'js'
            }
          }
        });
        System.import('app/main')
              .then(null, console.error.bind(console));
      &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;my-app&gt;Loading...&lt;/my-app&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>If I place it inside my main-component like so, it is not rendering at all:</p>
  
  <pre><code>import {Component} from 'angular2/core';
  
  @Component({
      selector: 'my-app',
      template: '&lt;div class="g-signin2" data-onsuccess="onSignIn"&gt;&lt;/div&gt;'
  })
  export class AppComponent { }
  </code></pre>
  
  <p>If I instead place the button directly in the body of index.html, the button rendered from the js-library is displayed correctly. </p>
  
  <p>The div is there when I inspect the element, but it seems that the button is trying to render before the script is loaded, since it is not displaying. </p>
  
  <p>Any idea as to why this is happening and how I can fix it?</p>
  
  <p>Thanks for any input!</p>