How to use the ngx-simple-modal.SimpleModalModule.forRoot function in ngx-simple-modal

To help you get started, we’ve selected a few ngx-simple-modal 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 KevCJones / ngx-simple-modal / demo-ng6 / src / app / app.module.ts View on Github external
import { ConfirmComponent } from './confirm/confirm.component';
import { PromptComponent } from './prompt/prompt.component';
import { ParentDialogModalComponent } from './parent-dialog/parent-dialog.component';
import { CustomErrorHandler } from './custom-error/custom-error-handler';
import { OptionService } from './alert-select/options.service';
import { AlertSelectComponent } from './alert-select/alert-select.component';
import { DefaultSimpleModalOptionConfig, defaultSimpleModalOptions } from 'ngx-simple-modal/simple-modal/simple-modal-options';


@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    SelectModule,
    SimpleModalModule.forRoot({container: 'modal-container'})
  ],
  declarations: [
    AppComponent,
    AlertComponent,
    AlertSelectComponent,
    ConfirmComponent,
    PromptComponent,
    ParentDialogModalComponent
  ],
  providers: [{
    provide: ErrorHandler,
    useClass: CustomErrorHandler,
  },
  // {
  //   provide: DefaultSimpleModalOptionConfig,
  //   useValue: {...defaultSimpleModalOptions, ...{ closeOnEscape: true, closeOnClickOutside: true }}
github KevCJones / ngx-simple-modal / demo-ng5 / src / app / app.module.ts View on Github external
import { ConfirmComponent } from './confirm/confirm.component';
import { PromptComponent } from './prompt/prompt.component';
import { ParentDialogModalComponent } from './parent-dialog/parent-dialog.component';
import { CustomErrorHandler } from './custom-error/custom-error-handler'
import { OptionService } from './alert-select/options.service';
import { AlertSelectComponent } from './alert-select/alert-select.component';
import { DefaultSimpleModalOptionConfig, defaultSimpleModalOptions } from 'ngx-simple-modal/simple-modal/simple-modal-options';


@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    SelectModule,
    SimpleModalModule.forRoot({container: 'modal-container'})
  ],
  declarations: [
    AppComponent,
    AlertComponent,
    AlertSelectComponent,
    ConfirmComponent,
    PromptComponent,
    ParentDialogModalComponent
  ],
  providers: [{
    provide: ErrorHandler,
    useClass: CustomErrorHandler,
  },
  // {
  //   provide: DefaultSimpleModalOptionConfig,
  //   useValue: {...defaultSimpleModalOptions, ...{ closeOnEscape: true, closeOnClickOutside: true }}
github KevCJones / ngx-simple-modal / demo-ng8 / src / app / app.module.ts View on Github external
import { OptionService } from './alert-select/options.service';
import { AlertComponent } from './alert/alert.component';
import { AppComponent } from './app.component';
import { ConfirmComponent } from './confirm/confirm.component';
import { CustomErrorHandler } from './custom-error/custom-error-handler';
import { ParentDialogModalComponent } from './parent-dialog/parent-dialog.component';
import { PromptComponent } from './prompt/prompt.component';

@NgModule({
  imports: [
    BrowserModule,
    FormsModule,
    HttpModule,
    SelectModule,
    A11yModule,
    SimpleModalModule.forRoot(
      { container: 'modal-container' },
      {
        ...defaultSimpleModalOptions,
        ...{
          closeOnEscape: true,
          closeOnClickOutside: true,
          animationDuration: 0,
          autoFocus: true,
        },
      }
    ),
  ],
  declarations: [
    AppComponent,
    AlertComponent,
    AlertSelectComponent,

ngx-simple-modal

A simple unopinionated framework to implement simple modal based behaviour in angular (v2+) projects.

MIT
Latest version published 4 years ago

Package Health Score

51 / 100
Full package analysis

Popular ngx-simple-modal functions