2016-03-08 51 views

回答

0

只要確保在index.html中包含dragula的.js文件並配置SystemJS Path Too。

<script src="/node_modules/dragula/dist/dragula.min.js"></script> 
<script src="/node_modules/ng2-dragula/bundles/ng2-dragula.js"></script> 


<script> 
    System.config({ 
    paths:{ 
     'dragula'   : '../node_modules/dragula/dist/dragula.min.js' 
    }, 
    packages: { 
     app: { 
     format: 'register', 
     defaultExtension: 'js' 
     } 
    } 
    }); 
System.import('app/main') 
     .then(null, console.error.bind(console)); 
</script>