Ng-bootstrap: Missing export of NgbTime

Created on 26 Oct 2018  路  3Comments  路  Source: ng-bootstrap/ng-bootstrap

Bug description:

In version 2.2.2 I could import NgbTime like this:
import { NgbTime } from '@ng-bootstrap/ng-bootstrap/timepicker/ngb-time';

Now I tried to upgrade and could not import the Class anymore.
Because following is missing in the current version of ng-bootstrap:

src/timepicker/timepicker.module.ts
export {NgbTime} from './ngb-time';

src/index.ts
export { NgbTimepickerModule, NgbTimepickerConfig, NgbTimeStruct, NgbTimepicker, NgbTimeAdapter, NgbTime } from './timepicker/timepicker.module';

Is there a reason why NgbTime is not exported anymore. Can you export it?

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 7
ng-bootstrap: 4
Bootstrap: 4.1.3

timepicker info feature

Most helpful comment

Right. We might open it as public but till then your best approach is to copy it over to your project - it is not a huge class: https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/timepicker/ngb-time.ts

All 3 comments

Is there a reason why NgbTime is not exported anymore. Can you export it?

With ng-bootstrap 3.0.0 we've migrated to Angular CLI and it changed the package format. With this change all the symbols now should be imported from the top-level namespace (@ng-bootstrap/ng-bootstrap). As such ``

Regarding NgbTime - so far it wasn't meant to be a public APIm, hence it is not exported from @ng-bootstrap/ng-bootstrap. We consider NgbTimeStruct as the public API.

We could mark this as a feature request if you see NgbTime as an useful addition and can elaborate on use-case(s).

Yes, as feature request it would be nice. We built a component that depends on NgbTime and now we struggle with the update to Angular 7 and latest ng-bootstrap.

Right. We might open it as public but till then your best approach is to copy it over to your project - it is not a huge class: https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/timepicker/ngb-time.ts

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mahmoudajawad picture mahmoudajawad  路  3Comments

riksof-zzlalani picture riksof-zzlalani  路  3Comments

beaverusiv picture beaverusiv  路  3Comments

rolandoldengarm picture rolandoldengarm  路  3Comments

seveves picture seveves  路  3Comments