How to use the @ngxs/router-plugin.NgxsRouterPluginModule.forRoot function in @ngxs/router-plugin

To help you get started, we’ve selected a few @ngxs/router-plugin 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 xlayers / xlayers / src / app / app.module.ts View on Github external
{ name: 'vue', func: xml }
  ];
}

const StoreDebugModule = [
  NgxsModule.forRoot([UiState, CodeGenState], {
    /**
     * WARNING: dont enbale the `developmentmode` config until it's been fixed!
     * ENABLING THIS, WILL THROW: TypeError: Cannot assign to read only property 'microTask' of object '[object Object]'
     * See similar issue in NgRx: https://github.com/brandonroberts/ngrx-store-freeze/issues/17
     */
    // developmentMode: !environment.production
  }),
  NgxsLoggerPluginModule.forRoot({ disabled: environment.production }),
  NgxsReduxDevtoolsPluginModule.forRoot({ disabled: environment.production }),
  NgxsRouterPluginModule.forRoot()
];

// AoT requires an exported function for factories
export function HttpLoaderFactory(http: HttpClient) {
  return new TranslateHttpLoader(http);
}


@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    HttpClientModule,
    BrowserAnimationsModule,
    StoreDebugModule,
    CoreModule,
github T-Systems-MMS / phonebook / Phonebook.Frontend / src / app / app.module.ts View on Github external
DialogsModule,
    ProfilePictureModule,
    SettingsModule,
    UserModule,
    FeatureFlagModule.forRoot(),
    NotImplementedModule,
    FeedbackDrawerModule,
    MatBadgeModule,
    NgxsModule.forRoot([AppState, BookmarksState, LastPersonsState, CommonPersonsState, SearchState, TableState], {
      // TODO: Fix https://github.com/T-Systems-MMS/phonebook/issues/95 first.
      // developmentMode: !environment.production
    }),
    NgxsStoragePluginModule.forRoot({
      key: ['appstate', 'bookmarks', 'commonpersons', 'lastpersons', 'tablestate']
    }),
    NgxsRouterPluginModule.forRoot(),
    NgxsLoggerPluginModule.forRoot({ disabled: environment.production }),
    NgxsReduxDevtoolsPluginModule.forRoot({ disabled: environment.production }),
    AddFilterModule,
    TableModule,
    ApiModule,
    // Has to be included here because of https://stackoverflow.com/a/41519512/9277073
    FeedbackDrawerModule,
    DragDropModule,
    ApiModule,
    IeWarningModule,
    PlatformModule,
    // Pages
    UserPagesModule
  ],
  providers: [
    {
github ForetagInc / fullstack-ts-boilerplate / libs / core / src / lib / core.module.ts View on Github external
@NgModule({
  providers: [
    CoreService,
  ],
  exports: [
    ClarityModule,
    ClrFormsNextModule,
  ],
  imports: [
    CommonModule,
    HttpClientModule,
    // NgxPageScrollModule,
    NgxsModule.forRoot([]),
    NgxsFormPluginModule.forRoot(),
    NgxsRouterPluginModule.forRoot(),
    ClarityModule,
    ClrFormsNextModule,
    GraphqlModule,
    AuthModule,
    I18nModule,
    NgxsReduxDevtoolsPluginModule.forRoot({
      disabled: environment.production,
    }),
    NgxsStoragePluginModule.forRoot({
      key: 'auth.token',
    }),
  ]
})
export class CoreModule {
  constructor(
    @Optional()
github abpframework / abp / npm / ng-packs / dist / core / fesm5 / abp-ng.core.js View on Github external
},
                {
                    provide: APP_INITIALIZER,
                    multi: true,
                    deps: [Injector],
                    useFactory: localeInitializer,
                },
            ],
        };
    };
    CoreModule.decorators = [
        { type: NgModule, args: [{
                    imports: [
                        NgxsModule.forFeature([ProfileState, SessionState, ConfigState]),
                        NgxsStoragePluginModule.forRoot({ key: 'SessionState' }),
                        NgxsRouterPluginModule.forRoot(),
                        CommonModule,
                        HttpClientModule,
                        FormsModule,
                        ReactiveFormsModule,
                        RouterModule,
                    ],
                    declarations: [
                        RouterOutletComponent,
                        DynamicLayoutComponent,
                        AutofocusDirective,
                        EllipsisDirective,
                        FormSubmitDirective,
                        LocalizationPipe,
                        PermissionDirective,
                        VisibilityDirective,
                        InputEventDebounceDirective,
github abpframework / abp / npm / ng-packs / dist / core / esm2015 / lib / core.module.js View on Github external
{
                    provide: APP_INITIALIZER,
                    multi: true,
                    deps: [Injector],
                    useFactory: localeInitializer,
                },
            ],
        };
    }
}
CoreModule.decorators = [
    { type: NgModule, args: [{
                imports: [
                    NgxsModule.forFeature([ProfileState, SessionState, ConfigState]),
                    NgxsStoragePluginModule.forRoot({ key: 'SessionState' }),
                    NgxsRouterPluginModule.forRoot(),
                    CommonModule,
                    HttpClientModule,
                    FormsModule,
                    ReactiveFormsModule,
                    RouterModule,
                ],
                declarations: [
                    RouterOutletComponent,
                    DynamicLayoutComponent,
                    AutofocusDirective,
                    EllipsisDirective,
                    ForDirective,
                    FormSubmitDirective,
                    LocalizationPipe,
                    PermissionDirective,
                    VisibilityDirective,
github T-Systems-MMS / phonebook / Phonebook.Frontend / src / app / modules / organigram / components / organigram-node / organigram-node.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      imports: [MatTooltipModule, NgxsModule.forRoot([AppState]), NgxsRouterPluginModule.forRoot()],
      declarations: [TestComponentWrapper, OrganigramNodeComponent],
      providers: [{ provide: MatSnackBar, useValue: null }, WindowRef],
      schemas: [NO_ERRORS_SCHEMA]
    }).compileComponents();
    store = TestBed.get(Store);
  }));
github Shyam-Chen / Angular-Starter / src / app.module.ts View on Github external
import { AppComponent } from './app.component';

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    CommonModule,
    MatButtonModule,
    MatToolbarModule,
    MatSidenavModule,
    MatExpansionModule,
    MatListModule,
    MatDividerModule,
    MatIconModule,
    NgxsModule.forRoot([]),
    NgxsRouterPluginModule.forRoot(),
    NgxsLoggerPluginModule.forRoot(),
    NgxsReduxDevtoolsPluginModule.forRoot(),

    AppRoutingModule,
  ],
  declarations: [AppComponent],
  providers: [],
  bootstrap: [AppComponent],
})
export class AppModule {}
github abpframework / abp / npm / ng-packs / dist / core / fesm2015 / abp-ng.core.js View on Github external
{
                    provide: APP_INITIALIZER,
                    multi: true,
                    deps: [Injector],
                    useFactory: localeInitializer,
                },
            ],
        };
    }
}
CoreModule.decorators = [
    { type: NgModule, args: [{
                imports: [
                    NgxsModule.forFeature([ProfileState, SessionState, ConfigState]),
                    NgxsStoragePluginModule.forRoot({ key: 'SessionState' }),
                    NgxsRouterPluginModule.forRoot(),
                    CommonModule,
                    HttpClientModule,
                    FormsModule,
                    ReactiveFormsModule,
                    RouterModule,
                ],
                declarations: [
                    RouterOutletComponent,
                    DynamicLayoutComponent,
                    AutofocusDirective,
                    EllipsisDirective,
                    FormSubmitDirective,
                    LocalizationPipe,
                    PermissionDirective,
                    VisibilityDirective,
                    InputEventDebounceDirective,
github ngxs / store / integration / app / store / store.module.ts View on Github external
import { NgxsFormPluginModule } from '@ngxs/form-plugin';
import { NgxsLoggerPluginModule } from '@ngxs/logger-plugin';
import { NgxsReduxDevtoolsPluginModule } from '@ngxs/devtools-plugin';
import { NgxsRouterPluginModule } from '@ngxs/router-plugin';

import { TodosState } from '@integration/store/todos/todos.state';
import { TodoState } from '@integration/store/todos/todo/todo.state';
import { environment as env } from '../../environments/environment';

@NgModule({
  imports: [
    CommonModule,
    NgxsFormPluginModule.forRoot(),
    NgxsLoggerPluginModule.forRoot({ logger: console, collapsed: false }),
    NgxsReduxDevtoolsPluginModule.forRoot({ disabled: env.production }),
    NgxsRouterPluginModule.forRoot(),
    NgxsModule.forRoot([TodosState, TodoState], { developmentMode: !env.production })
  ],
  exports: [
    NgxsFormPluginModule,
    NgxsLoggerPluginModule,
    NgxsReduxDevtoolsPluginModule,
    NgxsModule
  ]
})
export class NgxsStoreModule {}
github T-Systems-MMS / phonebook / Phonebook.Frontend / src / app / shared / components / add-filter / add-filter.component.spec.ts View on Github external
beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [TestComponentWrapperWithoutDisplayText, TestComponentWrapperFullIO],
      imports: [
        AddFilterModule,
        RouterTestingModule,
        NgxsModule.forRoot([SearchState]),
        NgxsRouterPluginModule.forRoot()
      ]
    }).compileComponents();
  }));

@ngxs/router-plugin

router plugin for @ngxs/store

MIT
Latest version published 19 days ago

Package Health Score

92 / 100
Full package analysis