如何使用纯javascript导入angular2 ng2引导

如何使用纯javascript导入angular2 ng2引导,javascript,angular,ng2-bootstrap,Javascript,Angular,Ng2 Bootstrap,我想把ng2引导程序导入到我的angular2中,它是用纯javascript而不是typescript编写的, 我找不到做这件事的任何资源,有人能帮我拿一个样品吗 我还在html文档中添加了对ng2-bootstrap.js文件的引用 app.AppMod ule = ng.core.NgModule({ imports: [ng.platformBrowser.BrowserModule, ng.forms.FormsModule,

我想把ng2引导程序导入到我的angular2中,它是用纯javascript而不是typescript编写的, 我找不到做这件事的任何资源,有人能帮我拿一个样品吗

我还在html文档中添加了对ng2-bootstrap.js文件的引用

app.AppMod

ule =
  ng.core.NgModule({
      imports: [ng.platformBrowser.BrowserModule,
                ng.forms.FormsModule,
                ng2Bootstrap.Ng2BootstrapModule], // **this is the way id import it**
      declarations: [app.AppComponent],          
      bootstrap: [app.AppComponent]
  })
  .Class({
      constructor: function () { }
  });
})(window.app || (window.app = {}));

你试过这种方法吗<代码>变量ng2_bootstrap=require('ng2-bootstrap/ng2 bootstrap')否,但我不确定这种方法是否有效。您尝试过这种方法吗?-<代码>变量ng2_bootstrap=require('ng2-bootstrap/ng2 bootstrap')否,但我不确定这种方法是否有效