D
D
DimaPolishuk2016-10-04 18:25:16
Angular
DimaPolishuk, 2016-10-04 18:25:16

How to connect npm_module in components in angular2?

var mailgun = require('../node_modules/mailgun-js/lib/mailgun.js')

I'm trying to connect this module in one of my components, the page opens in the browser, but the fact is that in the mailgun.js file, there are such lines
var tsscmp = require('tsscmp');
var crypto = require('crypto');

var Attachment = require('./attachment');
var Request = require('./request');
var builder = require('./build');
var resources = require('./schema').definitions;

and in the browser there is an error for each of the required() , tell me please, maybe I'm connecting the module to the component incorrectly? or some other error

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question