I have combined the brain tree just like you, and it works. I just installed another command
install first
npm install @types/braintree-web@3.0.1er
then install
npm install --save braintree-web@2.30.0
and use
braintree = require('braintree-web');
Again, if it asks braintree not defined, delete declare var braintree:any; and replace the following code
braintree.setup(clientToken, "dropin", { container: "payment-form", onReady: function(int) { c.integration = int } });
from
this.braintree.setup(clientToken, "dropin", { this.container: "payment-form", onReady: function(int) { c.integration = int } });
Edit:
just declare var after import declare var braintree:any; if you are working with angular 4 then declare declare var require: any;
Malhari
source share