首页 > angular2 中bootstrap指令和ng2-bootstrap这个有啥区别?

angular2 中bootstrap指令和ng2-bootstrap这个有啥区别?

1.我的理解是,bootstrap指令只是ng2用来渲染页面的(其实和bootstrap没有半毛钱关系)。ng2-bootstrap这个则是基于angular2 的扩展?(不知道这么理解对不对)
2.bootstrap这个指令并不能用bootstrap的那些样式属性,以及js属性。
3.在angular2项目中加入了ng2-bootstrap这个扩展以后就可以使用bootstrap的那些属性了。
4.求大神指点解惑。


别闹,angular2里的bootstrap是:

import {bootstrap} from '@angular/platform-browser-dynamic';

看文档:

Bootstrapping for Angular applications.

You instantiate an Angular application by explicitly specifying a component to use as the root component for your application via the `bootstrap()` method.

这个方法作为ng2应用的起始点,大致可以对应ng1里的bootstrap。

你说的ng2-bootstrap,很显然,她是一个对UI库bootstrap的指令封装集合


可以参考我们的网站 http://www.bootstrap.cn/


1:第一个bootstrap是angular的启动器,与ui没有关系。

2:第二个ng-bootstrap是适用于Angular2的bootstrap(ui+func),相当于Angular1.x的 Angular UI

【热门文章】
【热门文章】