I am trying to use braintree-web npm module with AngularJS since I get errors when I try and include it in the template with:
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
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:
<script>
braintree.setup(
// Replace this with a client token from your server
clientToken,
"dropin", {
container: "payment-form",
form: "checkout",
});
</script>
Please help. how can I do this?
EDIT:
Currently, this is placed a the bottom of my
<!-- braintree sdk -->
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<!-- braintree setup -->
<script>
var clientToken = removed;
braintree.setup(
// Replace this with a client token from your server
clientToken,
"dropin", {
container: "payment-form",
form: "checkout",
});
</script>
These are the errors I'm getting:
Looks to me like the braintree script is not loading(?)
Thanks for the help