ng-bootstrap alpha.25 上的标签损坏

ng-bootstrap tabs broken on alpha.25

我从 @ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.24" 到 @ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.25" 今天

标签停止工作。出现模板错误...下面的主题。

我从保存的版本降级了...又开始工作了。 angular 4.0.3 和 4.1.0

同样的错误
ERROR TypeError: Cannot read property 'templateRef' of undefined
at Object.View_NgbTabset_4.co [as updateDirectives] (NgbTabset.ngfactory.js:172)
at Object.updateDirectives (modules.js:64869)
at checkAndUpdateView (modules.js:64468)
at callViewAction (modules.js:64783)
at execEmbeddedViewsAction (modules.js:64755)
at checkAndUpdateView (modules.js:64469)
at callViewAction (modules.js:64783)
at execEmbeddedViewsAction (modules.js:64755)
at checkAndUpdateView (modules.js:64469)
at callViewAction (modules.js:64783)
at execComponentViewsAction (modules.js:64729)
at checkAndUpdateView (modules.js:64474)
at callViewAction (modules.js:64783)
at execEmbeddedViewsAction (modules.js:64755)
at checkAndUpdateView (modules.js:64469)

defaultErrorLogger @modules.js:53534 modules.js:53534 错误错误:未捕获(承诺):类型错误:无法读取未定义的 属性 'templateRef' 类型错误:无法读取未定义的 属性 'templateRef' 在 Object.View_NgbTabset_4.co [as updateDirectives] (NgbTabset.ngfactory.js:172) 在 Object.updateDirectives (modules.js:64869) 在 checkAndUpdateView (modules.js:64468) 在 callViewAction (modules.js:64783) 在 execEmbeddedViewsAction (modules.js:64755) 在 checkAndUpdateView (modules.js:64469) 在 callViewAction (modules.js:64783) 在 execEmbeddedViewsAction (modules.js:64755) 在 checkAndUpdateView (modules.js:64469) 在 callViewAction (modules.js:64783) 在 execComponentViewsAction (modules.js:64729) 在 checkAndUpdateView (modules.js:64474) 在 callViewAction (modules.js:64783) 在 execEmbeddedViewsAction (modules.js:64755) 在 checkAndUpdateView (modules.js:64469) 在 Object.View_NgbTabset_4.co [as updateDirectives] (NgbTabset.ngfactory.js:172) 在 Object.updateDirectives (modules.js:64869) 在 checkAndUpdateView (modules.js:64468) 在 callViewAction (modules.js:64783) 在 execEmbeddedViewsAction (modules.js:64755) 在 checkAndUpdateView (modules.js:64469) 在 callViewAction (modules.js:64783) 在 execEmbeddedViewsAction (modules.js:64755) 在 checkAndUpdateView (modules.js:64469) 在 callViewAction (modules.js:64783) 在 execComponentViewsAction (modules.js:64729) 在 checkAndUpdateView (modules.js:64474) 在 callViewAction (modules.js:64783) 在 execEmbeddedViewsAction (modules.js:64755) 在 checkAndUpdateView (modules.js:64469) 在 resolvePromise (modules.js:23019) [angular] 在 resolvePromise (modules.js:22990) [angular] 在:3000/packages/modules.js?hash=f354ed55dd142a450f6d0fca572238dff1e5abf2:23067:17 [angular] 在 Object.onInvokeTask (modules.js:56566) [angular] 在 drainMicroTaskQueue (modules.js:22900) [] 在 HTMLAnchorElement.ZoneTask.invoke (modules.js:22773) []

1.0.0-alpha.25 ng-bootstrap 完全切换到 Angular 4 这意味着您需要将 <template> 替换为 <ng-template>:

<ngb-tabset>
  <ngb-tab title="Simple">
    <ng-template ngbTabContent>
      <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth
      master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh
      dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum
      iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
    </ng-template>
  </ngb-tab>
  <ngb-tab>
    <ng-template ngbTabTitle><b>Fancy</b> title</ng-template>
    <ng-template ngbTabContent>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid.
      <p>Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table
      craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl
      cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia
      yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean
      shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero
      sint qui sapiente accusamus tattooed echo park.</p>
    </ng-template>
  </ngb-tab>
  <ngb-tab title="Disabled" [disabled]="true">
    <ng-template ngbTabContent>
      <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth
      master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh
      dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum
      iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p>
    </ng-template>
  </ngb-tab>
</ngb-tabset>

这是一个正在工作的插件:http://plnkr.co/edit/UK6LDVDduJwdS44Dmeac?p=preview