title: PayPal express checkout in angular 2 components - Loading issue?
body: <p>I am trying to dynamically create a paypal checkout button using the price of data objects contained and rendered by my angular 2 components. I would like to pass the paypal express code an amount and have it render a button for me when I open my checkout component but I am having huge problems. </p>
  
  <p>I followed this guide: <a href="https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/basic-integration/" rel="nofollow noreferrer">https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/basic-integration/</a> but if I try include paypals script code in a component it doesn't load and if I put the code in my Index.html the script loads and gives me this error: </p>
  
  <p>ppxo_xc_ppbutton_error Object {error: "Error: Document is ready and element #paypal-butto…calhost:3000/vendor.bundle.js:139776:25) []", timestamp: 1486999989713, windowID: "be296e274d", pageID: "a63dc0f8ab", host: "localhost:3000"…} </p>
  
  <p>Error: Document is ready and element #paypal-button does not exist
      at <a href="https://www.paypalobjects.com/api/checkout.js:5176:39" rel="nofollow noreferrer">https://www.paypalobjects.com/api/checkout.js:5176:39</a> []
      at Zone.runTask (<a href="http://localhost:3000/vendor.bundle.js:138551:47" rel="nofollow noreferrer">http://localhost:3000/vendor.bundle.js:138551:47</a>) [ => ]
      at ZoneTask.invoke (<a href="http://localhost:3000/vendor.bundle.js:138745:33" rel="nofollow noreferrer">http://localhost:3000/vendor.bundle.js:138745:33</a>) []
      at data.args.(anonymous function) (<a href="http://localhost:3000/vendor.bundle.js:139776:25" rel="nofollow noreferrer">http://localhost:3000/vendor.bundle.js:139776:25</a>) []</p>
  
  <ul>
  <li>unhandled_error Object {message: "Error: Document is ready and element #paypal-button does not exist", stack: "Error: Document is ready and element #paypal-butto…calhost:3000/vendor.bundle.js:139776:25) []", errtype: "[object Object]", event: "ppxo_unhandled_error", version: "4.0.39"…}
  zone.js:155 Uncaught ZoneAwareError {__zone_symbol__error: Error: Document is ready and element #paypal-button does not exist
  at <a href="https://www.paypalobjects" rel="nofollow noreferrer">https://www.paypalobjects</a>.…, __zone_symbol__stack: "Error: Document is ready and element #paypal-butto…calhost:3000/vendor.bundle.js:139776:25) []"}</li>
  </ul>