title: How to use npm module in angular?
body: <p>I am trying to use <a href="http://app.controller(&#39;BillingController&#39;,%20[&#39;$scope%E2%80%99,%20%E2%80%98braintree-web%E2%80%99,%20function($scope,%20braintree-web)%7B" rel="noreferrer">braintree-web</a> npm module with AngularJS since I get errors when I try and include it in the template with:</p>
  
  <pre><code>&lt;script src="https://js.braintreegateway.com/v2/braintree.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>I have a state called billing that I use to route to my template with the controller, 'BillingController'. I want to be able to inject braintree-web and myscript.js:</p>
  
  <pre><code>&lt;script&gt;
    braintree.setup(
            // Replace this with a client token from your server
            clientToken,
            "dropin", {
              container: "payment-form",
              form: "checkout",
            });
  &lt;/script&gt;
  </code></pre>
  
  <p>Please help. how can I do this?</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>Currently, this is placed a the bottom of my </p>
  
  <pre><code>&lt;!-- braintree sdk --&gt;
      &lt;script src="https://js.braintreegateway.com/v2/braintree.js"&gt;&lt;/script&gt;
  
      &lt;!-- braintree setup --&gt;
      &lt;script&gt;
        var clientToken = removed;
        braintree.setup(
            // Replace this with a client token from your server
            clientToken,
            "dropin", {
              container: "payment-form",
              form: "checkout",
            });
      &lt;/script&gt;
  </code></pre>
  
  <p>These are the errors I'm getting:</p>
  
  <p><a href="https://i.stack.imgur.com/GOEp6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/GOEp6.png" alt="enter image description here"></a></p>
  
  <p>Looks to me like the braintree script is not loading(?)</p>
  
  <p>Thanks for the help</p>