Ng2-Bootstrap:未捕获的ReferenceError:未定义require

时间:2016-06-12 15:44:02

标签: angular2-directives ng2-bootstrap

Angular2的新手,我正在尝试按照步骤实施ng2-bootstrap指令但没有成功。 我得到这个奇怪的,时间浪费错误“Uncaught ReferenceError:require is not defined”

我的index.html文件看起来像

 <link rel="stylesheet" href="/app/styles/roboto.min.css">
  <link rel="stylesheet" href="app/styles/app.custom.css">   
  <link rel="stylesheet" href="app/styles/bootstrap-theme.min.css" > 
  <link rel="stylesheet" href="app/styles/bootstrap.min.css" > 

  <script src="node_modules/systemjs/dist/system.src.js"></script>
  <script src="node_modules/core-js/client/shim.min.js"></script>
  <script src="node_modules/zone.js/dist/zone.js"></script>
  <script src="node_modules/reflect-metadata/Reflect.js"></script>
  <script src="systemjs.config.js"></script> 

  <script src="node_modules/ng2-pagination/dist/ng2-pagination-bundle.js"></script>
  <script src="node_modules/ng2-bootstrap/ng2-bootstrap.js"></script>

  <script> 

    System.config({
      packages: {
        app: {
          format: 'register',
          defaultExtension: 'js'
        }
      },
      map: {
        moment: 'node_modules/moment/moment.js'
      }
    });

    System.import('app/main').catch(function(err){ console.error(err); });

  </script> 
</head>

感谢您的帮助

0 个答案:

没有答案