NG Bootstrap 3.0.0 发布,Bootstrap 的 Angular 集成

来源: 投稿
作者: 王练
2018-08-14 07:51:10

NG Bootstrap 3.0.0 已发布,NG Bootstrap 是基于 Angular 开发的 Bootstrap CSS 框架的指令集,它是专为 Bootstrap 4 开发的 Angular 组件,由 ui-bootstrap 团队构建。

重要更改:

1、ng-bootstrap 3.0.0 最低要求 Angular 6.1.0 版本

2、该库现在通过 Angular Package Format (APF) v6.0 提供,@angular/cli 6

3、alert:简化 <ngb-alert> 生成的标记,不再有更多的中间 <div> 元素

Before:

<ngb-alert>
  <div role="alert" class="alert alert-warning">
    Hello there
  </div>
</ngb-alert>

After:

<ngb-alert role="alert" class="alert alert-warning">
  Hello there
</ngb-alert>

其他更改包括:

Bug Fixes

  • accordion: correct "collapsed" CSS class usage (25b5bee), closes #2553 #2555

  • accordion: the markup should follow the boostrap one (8ddc363), closes #2511

  • carousel: make it work inside the 'OnPush' components (827dfcb), closes #2597 #2599

  • datepicker: correctly override year numerals for multiple months (#2596) (bc540e9)

  • demo: missing / in bootstrap href link (42b1470), closes #2584 #2586

  • dropdown: close dropdown correctly inside the OnPush component (a2dea82), closes #2561 #2559

  • dropdown: remove global document click listener (d80204c), closes #900 #2518

  • modal: adjust modal background to avoid shifting (2871316), closes #641 #2508

  • modal: use correct ComponentFactoryResolver (8d72f37), closes #2588

  • typeahead: don't fail when user returns falsy results (de613ae), closes #2530 #2550

Chores

  • bump minimal required version of Angular to 6.1 (335598c), closes #2548

Code Refactoring

Features

  • datepicker: allow overriding day, week number and year numerals (91c04e9), closes #2593

  • datepicker: close popup on outside click (347f0ff), closes #2558

  • datepicker: initial version of Jalali calendar (e465fa6)

  • datepicker: make 'NgbDate' part of a public API (122f93f), closes #2540

  • popover: autoclose (6e2340d), closes #933 #2554

  • tabset: allow arbitrary nav type (#2592) (1e68401), closes #1661

  • tooltip: autoclose (fa765a8), closes #2571

更多细节可查阅 CHANGELOG 。

源码下载:

展开阅读全文
点击加入讨论🔥(1) 发布并加入讨论🔥
1 评论
8 收藏
分享
返回顶部
顶部