How to use ngx-bootstrap - 10 common examples

To help you get started, we’ve selected a few ngx-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 dotnetcore / OSharp / tests / web / ui / angle / src / app / shared / angle / angle.module.ts View on Github external
TranslateModule,
        AccordionModule.forRoot(),
        AlertModule.forRoot(),
        ButtonsModule.forRoot(),
        CarouselModule.forRoot(),
        CollapseModule.forRoot(),
        DatepickerModule.forRoot(),
        BsDropdownModule.forRoot(),
        ModalModule.forRoot(),
        PaginationModule.forRoot(),
        ProgressbarModule.forRoot(),
        RatingModule.forRoot(),
        TabsModule.forRoot(),
        TimepickerModule.forRoot(),
        TooltipModule.forRoot(),
        TypeaheadModule.forRoot(),
        ToasterModule,
        // Material Modules
        MatAutocompleteModule,
        MatButtonModule,
        MatButtonToggleModule,
        MatCardModule,
        MatCheckboxModule,
        MatChipsModule,
        MatTableModule,
        MatDatepickerModule,
        MatDialogModule,
        MatExpansionModule,
        MatFormFieldModule,
        MatGridListModule,
        MatIconModule,
        MatInputModule,
github aspnetboilerplate / module-zero-core-template / angular / src / root.module.ts View on Github external
return abp.localization.currentLanguage.name;
  }

  // todo: Waiting for https://github.com/angular/angular/issues/31465 to be fixed.
  return 'en';
}

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    HttpClientModule,
    SharedModule.forRoot(),
    ModalModule.forRoot(),
    BsDropdownModule.forRoot(),
    CollapseModule.forRoot(),
    TabsModule.forRoot(),
    AbpModule,
    ServiceProxyModule,
    RootRoutingModule,
  ],
  declarations: [RootComponent],
  providers: [
    { provide: HTTP_INTERCEPTORS, useClass: AbpHttpInterceptor, multi: true },
    {
      provide: APP_INITIALIZER,
      useFactory: (appInitializer: AppInitializer) => appInitializer.init(),
      deps: [AppInitializer],
      multi: true,
    },
    { provide: API_BASE_URL, useFactory: () => AppConsts.remoteServiceBaseUrl },
    {
github valor-software / ngx-bootstrap / src / modal / modal.directive.ts View on Github external
event.preventDefault();
    }

    this.onHide.emit(this);

    // todo: add an option to prevent hiding
    if (!this._isShown) {
      return;
    }

    clearTimeout(this.timerHideModal);
    clearTimeout(this.timerRmBackDrop);

    this._isShown = false;
    this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.IN);
    if (!isBs3()) {
      this._renderer.removeClass(this._element.nativeElement, CLASS_NAME.SHOW);
    }
    // this._addClassIn = false;

    if (this._config.animated) {
      this.timerHideModal = setTimeout(
        () => this.hideModal(),
        TRANSITION_DURATION
      );
    } else {
      this.hideModal();
    }
  }
github fabric8-ui / fabric8-ui / src / a-runtime-console / kubernetes / ui / app / app.module.ts View on Github external
import { NamespaceService } from '../../service/namespace.service';
import { ConfigMapStore } from './../../store/configmap.store';
import { NamespaceStore } from './../../store/namespace.store';
import { ConfigMapModule } from './../configmap/configmap.module';
import { DeploymentModule } from './../deployment/deployment.module';
import { EventModule } from './../event/event.module';
import { PodModule } from './../pod/pod.module';
import { ReplicaSetModule } from './../replicaset/replicaset.module';
import { ServiceModule } from './../service/service.module';
import { AppRoutingModule } from './app-routing.module';
import { AppListPageComponent } from './list-page/list-page.app.component';
import { AppListComponent } from './list/list.app.component';

@NgModule({
  imports: [
    BsDropdownModule.forRoot(),
    CommonModule,
    FormsModule,
    ModalModule,
    MomentModule,
    RouterModule,
    Fabric8CommonModule,
    KubernetesComponentsModule,
    // Our Routing MUST go before the other Kuberenetes UI modules, so our routes take precedence
    AppRoutingModule,
    DeploymentModule,
    ConfigMapModule,
    EventModule,
    PodModule,
    ReplicaSetModule,
    ServiceModule
  ],
github ahrnee / nestjs-bff / webclient / src / app / views / notifications / notifications.module.ts View on Github external
import { BadgesComponent } from './badges.component';

// Modal Component
import { ModalModule } from 'ngx-bootstrap/modal';
import { ModalsComponent } from './modals.component';

// Notifications Routing
import { NotificationsRoutingModule } from './notifications-routing.module';

@NgModule({
  imports: [
    CommonModule,
    NotificationsRoutingModule,
    AlertModule.forRoot(),
    ModalModule.forRoot()
  ],
  declarations: [
    AlertsComponent,
    BadgesComponent,
    ModalsComponent
  ]
})
export class NotificationsModule { }
github ceph / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / prometheus / silence-form / silence-form.component.spec.ts View on Github external
let params;
  // Date mocking related
  let originalDate;
  const baseTime = new Date('2022-02-22T00:00:00');
  const beginningDate = new Date('2022-02-22T00:00:12.35');

  const routes: Routes = [{ path: '404', component: NotFoundComponent }];
  configureTestBed({
    declarations: [NotFoundComponent, SilenceFormComponent],
    imports: [
      HttpClientTestingModule,
      RouterTestingModule.withRoutes(routes),
      BsDatepickerModule.forRoot(),
      SharedModule,
      ToastrModule.forRoot(),
      TooltipModule.forRoot(),
      ReactiveFormsModule
    ],
    providers: [
      i18nProviders,
      {
        provide: ActivatedRoute,
        useValue: { params: { subscribe: (fn) => fn(params) } }
      }
    ]
  });

  const createMatcher = (name, value, isRegex) => ({ name, value, isRegex });

  const addMatcher = (name, value, isRegex) =>
    component['setMatcher'](createMatcher(name, value, isRegex));
github ceph / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / block / iscsi-target-list / iscsi-target-list.component.spec.ts View on Github external
describe('IscsiTargetListComponent', () => {
  let component: IscsiTargetListComponent;
  let fixture: ComponentFixture;
  let summaryService: SummaryService;
  let iscsiService: IscsiService;

  const refresh = (data) => {
    summaryService['summaryDataSource'].next(data);
  };

  configureTestBed({
    imports: [
      HttpClientTestingModule,
      RouterTestingModule,
      SharedModule,
      TabsModule.forRoot(),
      TreeModule,
      ToastModule.forRoot()
    ],
    declarations: [IscsiTargetListComponent, IscsiTabsComponent, IscsiTargetDetailsComponent],
    providers: [TaskListService, i18nProviders]
  });

  beforeEach(() => {
    fixture = TestBed.createComponent(IscsiTargetListComponent);
    component = fixture.componentInstance;
    summaryService = TestBed.get(SummaryService);
    iscsiService = TestBed.get(IscsiService);

    // this is needed because summaryService isn't being reset after each test.
    summaryService['summaryDataSource'] = new BehaviorSubject(null);
    summaryService['summaryData$'] = summaryService['summaryDataSource'].asObservable();
github aspnetrun / run-aspnetcore-cqrs / src / AspnetRun.Web / src / app / core / core.module.ts View on Github external
...APP_CONTAINERS,
  ],
  imports: [
    RouterModule,
    NgxUiLoaderModule,
    //NgxUiLoaderRouterModule, // import this module for showing loader automatically when navigating between app routes
    NgxUiLoaderHttpModule.forRoot({ showForeground: false }),
    ToastrModule.forRoot({ positionClass: 'toast-top-full-width', closeButton: true }),
    AppAsideModule,
    AppBreadcrumbModule.forRoot(),
    AppFooterModule,
    AppHeaderModule,
    AppSidebarModule,
    PerfectScrollbarModule,
    BsDropdownModule.forRoot(),
    TabsModule.forRoot(),
    NgWizardModule.forRoot(ngWizardConfig),
  ],
  exports: [
    RouterModule,
    HttpClientModule,
    NgxUiLoaderModule,
    NgWizardModule,
    LayoutComponent,
  ],
  providers: [
    ProductDataService,
    CategoryDataService,
    CustomerDataService,
    AuthService,
    AuthGuardService,
    ValidationService,
github aviabird / angularhunt / src / app / app.module.ts View on Github external
FooterComponent,
    AdminPageComponent,
    UrlValidatorDirective,
    AdComponent,
  ],
  imports: [
    BrowserModule,
    FormsModule,
    ReactiveFormsModule,
    HttpModule,
    JsonpModule,
    routing,
    StoreModule.provideStore(reducer),
    StoreDevtoolsModule.instrumentStore(instrumentOptions),
    // StoreLogMonitorModule,
    ModalModule.forRoot(),
    BsDropdownModule.forRoot(),
    ShareButtonsModule.forRoot(),
    EffectsModule.run(ProjectEffects),
    EffectsModule.run(UserEffects),
    EffectsModule.run(TopicEffects),
    AngularFireModule.initializeApp(firebaseConfig, {
      method: AuthMethods.Redirect
    }),
  ],
  providers: [
    TopicActions,
    UserActions,
    ProjectActions,
    CanActivateViaAuthGuard,
    ProjectService,
    AuthenticationService,
github oliviersinnaeve / b2bcoin-wallet / front-coin-wallet / src / app / app.module.ts View on Github external
declarations: [
        App
    ],
    imports: [ // import Angular's modules
        BrowserModule,
        // shown passing optional global defaults
        AdsenseModule.forRoot({
            adClient: 'ca-pub-5721689054603180',
            adSlot: 6949772221,
        }),
        HttpClientModule,
        RouterModule,
        FormsModule,
        ReactiveFormsModule,
        NgaModule.forRoot(),
        TooltipModule.forRoot(),
        SimpleNotificationsModule.forRoot(),
        MarkdownModule.forRoot(),
        PagesModule,
        ApiModule,
        ApiModuleCoin,
        TranslateModule.forRoot(),
        routing
    ],
    providers: [ // expose our Services and Providers into Angular's dependency injection
        ENV_PROVIDERS,
        APP_PROVIDERS,
        {provide: user.BASE_PATH, useValue: baseUrl + "/user/api"},
        {provide: b2bcoin.BASE_PATH, useValue: baseUrl + "/b2bcoin/api"}
    ]
})