On my index.html page, I have a form that utilizes an external javascript:
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script>
var clientToken = removed
braintree.setup(
// Replace this with a client token from your server
clientToken,
"dropin", {
container: "payment-form",
form: "checkout"
});
</script>
Prior to integrating this page with Angular, I made sure it was functioning correctly. After making it an angular state using $stateProvider:
.state('billing', {
url: '/billing',
views: {
'main': {
controller: 'BillingController as billingCtrl',
templateUrl: '/billing/index.html'
}
}
});
When routing to the new page, I encountered these errors:
https://i.sstatic.net/aPiX0.png
I prefer not to use third-party libraries like braintree-angular. It appears that the Angular template does not recognize the <script> tags because they are used to bind controllers to the HTML.