How to use @ng-bootstrap/ng-bootstrap - 10 common examples

To help you get started, we’ve selected a few @ng-bootstrap/ng-bootstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Fundator / IMO-Maritime-Single-Window / IMOMaritimeSingleWindow / Client / src / app / main-content / content-container / port-call / registration / forms / voyages / voyages.component.ts View on Github external
if (this.etaModel && this.etdModel) {
      const etaDate = new NgbDate(this.etaModel.date.year, this.etaModel.date.month, this.etaModel.date.day);
      const etdDate = new NgbDate(this.etdModel.date.year, this.etdModel.date.month, this.etdModel.date.day);

      this.etaIsAfterEtdError = etdDate.before(etaDate);

      if (etdDate.equals(etaDate)) {
        this.etaIsAfterEtdError = this.etaModel.time.hour > this.etdModel.time.hour
          || (this.etaModel.time.hour === this.etdModel.time.hour
            && this.etaModel.time.minute >= this.etdModel.time.minute);
      }
    } else {
      this.etaIsAfterEtdError = false;
    }

    const prevEtdDate = this.prevEtdModel != null && this.prevEtdModel.date != null ? new NgbDate(this.prevEtdModel.date.year, this.prevEtdModel.date.month, this.prevEtdModel.date.day) : null;
    const nextEtaDate = this.nextEtaModel != null && this.nextEtaModel.date != null ? new NgbDate(this.nextEtaModel.date.year, this.nextEtaModel.date.month, this.nextEtaModel.date.day) : null;

    // Checking for sequence errors between prev and current port of call
    if (prevEtdDate && this.etaModel) {
      this.prevEtdIsAfterCurrentEtaError = prevEtdDate.after(this.etaModel.date);
      if (prevEtdDate.equals(this.etaModel.date)) {
        this.prevEtdIsAfterCurrentEtaError = this.prevEtdModel.time.hour > this.etaModel.time.hour
          || (this.prevEtdModel.time.hour === this.etaModel.time.hour
            && this.prevEtdModel.time.minute >= this.etaModel.time.minute);
      }
    } else {
      this.prevEtdIsAfterCurrentEtaError = false;
    }

    // Checking for sequence errors between next and current port of call
    if (nextEtaDate && this.etdModel) {
github Fundator / IMO-Maritime-Single-Window / IMOMaritimeSingleWindow / Client / src / app / main-content / content-container / port-call / registration / forms / voyages / voyages.component.ts View on Github external
const etaDate = new NgbDate(this.etaModel.date.year, this.etaModel.date.month, this.etaModel.date.day);
      const etdDate = new NgbDate(this.etdModel.date.year, this.etdModel.date.month, this.etdModel.date.day);

      this.etaIsAfterEtdError = etdDate.before(etaDate);

      if (etdDate.equals(etaDate)) {
        this.etaIsAfterEtdError = this.etaModel.time.hour > this.etdModel.time.hour
          || (this.etaModel.time.hour === this.etdModel.time.hour
            && this.etaModel.time.minute >= this.etdModel.time.minute);
      }
    } else {
      this.etaIsAfterEtdError = false;
    }

    const prevEtdDate = this.prevEtdModel != null && this.prevEtdModel.date != null ? new NgbDate(this.prevEtdModel.date.year, this.prevEtdModel.date.month, this.prevEtdModel.date.day) : null;
    const nextEtaDate = this.nextEtaModel != null && this.nextEtaModel.date != null ? new NgbDate(this.nextEtaModel.date.year, this.nextEtaModel.date.month, this.nextEtaModel.date.day) : null;

    // Checking for sequence errors between prev and current port of call
    if (prevEtdDate && this.etaModel) {
      this.prevEtdIsAfterCurrentEtaError = prevEtdDate.after(this.etaModel.date);
      if (prevEtdDate.equals(this.etaModel.date)) {
        this.prevEtdIsAfterCurrentEtaError = this.prevEtdModel.time.hour > this.etaModel.time.hour
          || (this.prevEtdModel.time.hour === this.etaModel.time.hour
            && this.prevEtdModel.time.minute >= this.etaModel.time.minute);
      }
    } else {
      this.prevEtdIsAfterCurrentEtaError = false;
    }

    // Checking for sequence errors between next and current port of call
    if (nextEtaDate && this.etdModel) {
      this.nextEtaIsBeforeCurrentEtdError = nextEtaDate.before(this.etdModel.date);
github ordercloud-api / ngx-shopper / src / UI / Buyer / src / app / shared / shared.module.ts View on Github external
// angular
    CommonModule,
    HttpClientModule,
    ReactiveFormsModule,

    // 3rd party UI
    FontAwesomeModule,
    TextMaskModule,

    /**
     * ng-bootstrap modules
     * only those that are used by app
     * should be imported to reduce bundle size
     */
    NgbDatepickerModule.forRoot(),
    NgbCollapseModule.forRoot(),
    NgbModalModule.forRoot(),
    NgbTabsetModule.forRoot(),
    NgbPaginationModule.forRoot(),
    NgbPopoverModule.forRoot(),
    NgbAccordionModule.forRoot(),
    NgbCarouselModule.forRoot(),
    NgbDropdownModule.forRoot(),
  ],
  exports: [
    // angular
    CommonModule,
    HttpClientModule,
    ReactiveFormsModule,

    // 3rd party UI
    FontAwesomeModule,
github DSpace / dspace-angular / src / app / shared / search / search-sidebar / search-sidebar.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [TranslateModule.forRoot(), NgbCollapseModule.forRoot()],
      declarations: [SearchSidebarComponent],
      schemas: [NO_ERRORS_SCHEMA],
    })
      .compileComponents();  // compile template and css
  }));
github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / modules / notification / modules / modals / modals.module.js View on Github external
var ModalsModule = /** @class */ (function () {
    function ModalsModule() {
    }
    ModalsModule = __decorate([
        core_1.NgModule({
            imports: [
                // MODULE IMPORTS
                ng_bootstrap_1.NgbModule.forRoot(),
                platform_browser_1.BrowserModule
            ],
            declarations: [
                // COMPONENTS IN THIS MODULE
                confirmation_modal_content_component_1.ConfirmationModalContent,
                error_modal_content_component_1.ErrorModalContent
            ],
            exports: [],
            providers: [
                // SERVICES
                confirmation_modal_service_1.ConfirmationModal,
                error_notification_modal_service_1.ErrorNotificationModalService
            ],
            bootstrap: [],
            entryComponents: [
                // ENTRY POINTS
github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / modules / views / side / modules / properties-editor / properties-editor.module.js View on Github external
var PropertiesEditorModule = /** @class */ (function () {
    function PropertiesEditorModule() {
    }
    PropertiesEditorModule = __decorate([
        core_1.NgModule({
            imports: [
                // MODULE IMPORTS
                platform_browser_1.BrowserModule,
                generic_form_module_1.GenericFormModule,
                navigator_module_1.NavigatorModule,
                ng_bootstrap_1.NgbModule.forRoot(),
                forms_1.FormsModule,
                forms_1.ReactiveFormsModule,
                icons_module_1.IconsModule
            ],
            declarations: [
                // COMPONENTS IN THIS MODULE
                properties_editor_component_1.PropertiesEditor,
                tracing_links_component_1.TracingLinks,
                tracing_link_component_1.TracingLink
            ],
            exports: [
                // THE COMPONENTS VISIBLE TO THE OUTSIDE
                properties_editor_component_1.PropertiesEditor
            ],
            providers: [],
            bootstrap: []
github RobertDyball / A2SPA / VS2017 / A2SPA / wwwroot / app / app.module.js View on Github external
var forms_1 = require("@angular/forms");
var http_1 = require("@angular/http");
var sampleData_service_1 = require("./services/sampleData.service");
var auth_service_1 = require("./security/auth.service");
var auth_guard_service_1 = require("./security/auth-guard.service");
require("./rxjs-operators");
var ng_bootstrap_1 = require("@ng-bootstrap/ng-bootstrap");
// enableProdMode();
var AppModule = (function () {
    function AppModule() {
    }
    return AppModule;
}());
AppModule = __decorate([
    core_1.NgModule({
        imports: [ng_bootstrap_1.NgbModule.forRoot(), animations_1.BrowserAnimationsModule, platform_browser_1.BrowserModule, forms_1.FormsModule, http_1.HttpModule, app_routing_1.routing],
        declarations: [app_component_1.AppComponent, app_routing_1.routedComponents],
        providers: [sampleData_service_1.SampleDataService,
            auth_service_1.AuthService,
            auth_guard_service_1.AuthGuard, platform_browser_1.Title, { provide: common_1.APP_BASE_HREF, useValue: '/a2spa' }],
        bootstrap: [app_component_1.AppComponent]
    })
], AppModule);
exports.AppModule = AppModule;
//# sourceMappingURL=app.module.js.map
github junkerm / specmate / bundles / specmate-ui-core / webcontent / app / modules / views / main / static / modules / page-not-found / page-not-found.module.js View on Github external
var PageNotFoundModule = (function () {
    function PageNotFoundModule() {
    }
    PageNotFoundModule = __decorate([
        core_1.NgModule({
            imports: [
                // MODULE IMPORTS
                ng_bootstrap_1.NgbModule
            ],
            declarations: [
                // COMPONENTS IN THIS MODULE
                page_not_found_component_1.PageNotFound
            ],
            exports: [
                // THE COMPONENTS VISIBLE TO THE OUTSIDE
                page_not_found_component_1.PageNotFound
            ],
            providers: [],
            bootstrap: []
        })
    ], PageNotFoundModule);
    return PageNotFoundModule;
}());
exports.PageNotFoundModule = PageNotFoundModule;
github ordercloud-api / ngx-shopper / src / UI / Buyer / src / app / shared / shared.module.ts View on Github external
SharedRoutingModule,
    // angular
    CommonModule,
    HttpClientModule,
    ReactiveFormsModule,

    // 3rd party UI
    FontAwesomeModule,
    TextMaskModule,

    /**
     * ng-bootstrap modules
     * only those that are used by app
     * should be imported to reduce bundle size
     */
    NgbDatepickerModule.forRoot(),
    NgbCollapseModule.forRoot(),
    NgbModalModule.forRoot(),
    NgbTabsetModule.forRoot(),
    NgbPaginationModule.forRoot(),
    NgbPopoverModule.forRoot(),
    NgbAccordionModule.forRoot(),
    NgbCarouselModule.forRoot(),
    NgbDropdownModule.forRoot(),
  ],
  exports: [
    // angular
    CommonModule,
    HttpClientModule,
    ReactiveFormsModule,

    // 3rd party UI
github ordercloud-api / ngx-shopper / src / UI / Buyer / src / app / shared / shared.module.ts View on Github external
// 3rd party UI
    FontAwesomeModule,
    TextMaskModule,

    /**
     * ng-bootstrap modules
     * only those that are used by app
     * should be imported to reduce bundle size
     */
    NgbDatepickerModule.forRoot(),
    NgbCollapseModule.forRoot(),
    NgbModalModule.forRoot(),
    NgbTabsetModule.forRoot(),
    NgbPaginationModule.forRoot(),
    NgbPopoverModule.forRoot(),
    NgbAccordionModule.forRoot(),
    NgbCarouselModule.forRoot(),
    NgbDropdownModule.forRoot(),
  ],
  exports: [
    // angular
    CommonModule,
    HttpClientModule,
    ReactiveFormsModule,

    // 3rd party UI
    FontAwesomeModule,
    TextMaskModule,

    NgbDatepickerModule,
    NgbCollapseModule,