0
votes

i m install dragula and fix the system.config

     var map = {
    'app':                        'dist', // 'dist',
    '@angular':                   'node_modules/@angular',
    'rxjs':                       'node_modules/rxjs',
    'dragula':                    'node_modules/dragula/dist/dragula.min.js',
    'ng2-dragula/ng2-dragula':    'node_modules/ng2-dragula/ng2-dragula.js'
  };
extension
  var packages = {
    'app':                        { main: 'main.js',  defaultExtension: 'js' },
    'rxjs':                       { defaultExtension: 'js' },
    'dragula':                    { defaultExtension: 'js' },
    'ng2-dragula':                { defaultExtension: 'js' }
  };

import {DragulaModule, DragulaService} from 'ng2-dragula/ng2-dragula';

but the problem is when i m start npm

i have this error

the server responded with a status of 404 (Not Found) http://localhost:3002/node_modules/ng2-dragula/index

why?

Thanks

1

1 Answers

0
votes

Try

var map = {
  ...
  'ng2-dragula': 'node_modules/ng2-dragula'
};

var packages = {
  ...
  'ng2-dragula': {main: 'ng2-dragula.js', defaultExtension: 'js'},
};

and

import {DragulaModule, DragulaService} from 'ng2-dragula';