How to use the @ngxs/store.NgxsModule.forFeature function in @ngxs/store

To help you get started, we’ve selected a few @ngxs/store 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 abpframework / abp / npm / ng-packs / dist / setting-management / fesm5 / abp-ng.setting-management.js View on Github external
var SettingManagementModule = /** @class */ (function () {
    function SettingManagementModule() {
    }
    SettingManagementModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [SettingManagementComponent],
                    imports: [
                        SettingManagementRoutingModule,
                        CoreModule,
                        ThemeSharedModule,
                        NgxsModule.forFeature([SettingManagementState]),
                    ],
                },] }
    ];
    return SettingManagementModule;
}());
github abpframework / abp / npm / ng-packs / dist / feature-management / fesm2015 / abp-ng.feature-management.js View on Github external
* @type {?}
     * @private
     */
    FeatureManagementComponent.prototype.store;
}

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
class FeatureManagementModule {
}
FeatureManagementModule.decorators = [
    { type: NgModule, args: [{
                declarations: [FeatureManagementComponent],
                imports: [CoreModule, ThemeSharedModule, NgxsModule.forFeature([FeatureManagementState])],
                exports: [FeatureManagementComponent],
            },] }
];

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */

/**
 * @fileoverview added by tsickle
github ngxs / ngxs-examples / timekeeper / src / app / auth / auth.module.ts View on Github external
import { AuthState } from './auth.state';
import { LoginView } from './login-view/login.view';
import { AuthenticatedGuard } from './authenticated.guard';

export const AUTH_ROUTES: Routes = [
  { path: 'auth/login', component: LoginView },
];

@NgModule({
  imports: [
    AngularFireAuthModule,
    MaterialModule,

    RouterModule.forChild(AUTH_ROUTES),

    NgxsModule.forFeature([
      AuthState,
    ]),
  ],
  declarations: [
    LoginView,
  ],
  providers: [
    AuthenticatedGuard
  ]
})
export class AuthModule {}
github abpframework / abp / npm / ng-packs / packages / setting-management / src / lib / setting-management.module.ts View on Github external
import { CoreModule } from '@abp/ng.core';
import { ThemeSharedModule } from '@abp/ng.theme.shared';
import { NgModule } from '@angular/core';
import { SettingManagementRoutingModule } from './setting-management-routing.module';
import { SettingManagementComponent } from './components/setting-management.component';
import { NgxsModule } from '@ngxs/store';
import { SettingManagementState } from './states/setting-management.state';

@NgModule({
  declarations: [SettingManagementComponent],
  imports: [
    SettingManagementRoutingModule,
    CoreModule,
    ThemeSharedModule,
    NgxsModule.forFeature([SettingManagementState]),
  ],
})
export class SettingManagementModule {}
github ngxs-labs / data / integration / app / examples / count / count.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { NgxsModule } from '@ngxs/store';

import { CountComponent } from './count.component';
import { CountState } from './count.state';
import { FormsModule } from '@angular/forms';
import { CountSubState } from './count-sub.state';

@NgModule({
    declarations: [CountComponent],
    imports: [
        CommonModule,
        FormsModule,
        NgxsModule.forFeature([CountState, CountSubState]),
        RouterModule.forChild([{ path: '', component: CountComponent }])
    ]
})
export class CountModule {}
github abpframework / abp / npm / ng-packs / dist / core / esm5 / lib / core.module.js View on Github external
deps: [Injector],
                    useFactory: getInitialData,
                },
                {
                    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,
github berta-cms / berta / editor / src / app / sites / template-settings / site-template-settings.module.ts View on Github external
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { SiteTemplateSettingsComponent } from './site-template-settings.component';
import { SiteTemplateSettingsState } from './site-template-settings.state';
import { NgxsModule } from '@ngxs/store';
import { SiteTemplatesState } from './site-templates.state';
import { SitesSharedModule } from '../shared/sites-shared.module';

@NgModule({
  imports: [
    CommonModule,
    RouterModule.forChild([]),
    NgxsModule.forFeature([
      SiteTemplateSettingsState,
      SiteTemplatesState
    ]),
    SitesSharedModule
  ],
  declarations: [SiteTemplateSettingsComponent]
})
export class SiteTemplateSettingsModule { }
github abpframework / abp / npm / ng-packs / dist / core / esm2015 / lib / core.module.js View on Github external
useFactory: getInitialData,
                },
                {
                    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,
github abpframework / abp / npm / ng-packs / dist / setting-management / esm5 / lib / setting-management.module.js View on Github external
var SettingManagementModule = /** @class */ (function () {
    function SettingManagementModule() {
    }
    SettingManagementModule.decorators = [
        { type: NgModule, args: [{
                    declarations: [SettingManagementComponent],
                    imports: [
                        SettingManagementRoutingModule,
                        CoreModule,
                        ThemeSharedModule,
                        NgxsModule.forFeature([SettingManagementState]),
                    ],
                },] }
    ];
    return SettingManagementModule;
}());
export { SettingManagementModule };
github ngxs / store / packages / router-plugin / src / router.module.ts View on Github external
import { ModuleWithProviders, NgModule } from '@angular/core';
import { NgxsModule } from '@ngxs/store';

import { RouterState } from './router.state';
import { DefaultRouterStateSerializer, RouterStateSerializer } from './serializer';

@NgModule({
  imports: [NgxsModule.forFeature([RouterState])]
})
export class NgxsRouterPluginModule {
  static forRoot(): ModuleWithProviders {
    return {
      ngModule: NgxsRouterPluginModule,
      providers: [{ provide: RouterStateSerializer, useClass: DefaultRouterStateSerializer }]
    };
  }
}