本文整理汇总了TypeScript中@ngxs/store.NgxsModule类的典型用法代码示例。如果您正苦于以下问题:TypeScript NgxsModule类的具体用法?TypeScript NgxsModule怎么用?TypeScript NgxsModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了NgxsModule类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
BrowserModule,
RouterTestingModule,
DragDropModule,
MaterialModule,
FormsModule,
FormHelperModule,
LayoutModule,
ReactiveFormsModule,
HttpClientTestingModule,
NgxsModule.forRoot([AppState, SessionState]),
NgxsFormPluginModule,
NgProgressModule,
NgProgressHttpModule,
NoopAnimationsModule,
ToastrModule.forRoot(),
],
providers: [
{
provide: ActivatedRoute,
useValue: {
paramMap: of(convertToParamMap({
storageId: 'storage-id',
type: RepositoryTypeEnum.HOSTED.toLowerCase()
}))
}
}
],
declarations: [ManageRepositoryComponent]
}).compileComponents();
}));
示例2: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
BrowserAnimationsModule,
MaterialModule,
LayoutModule,
HttpClientTestingModule,
NgxsModule.forRoot([]),
RouterTestingModule.withRoutes([
{
path: 'admin/storages/:storageId/:repositoryId',
children: [
{
path: '**',
component: BrowseRepositoryComponent
}
]
},
])
],
declarations: [BrowseRepositoryComponent]
}).compileComponents();
router = TestBed.get(Router);
ngZone = TestBed.get(NgZone);
ngZone.run(() => {
router.initialNavigation();
router.navigateByUrl('admin/storages/myStorageId/myRepositoryId/some/long/path');
});
}));
示例3: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
RouterTestingModule,
BrowserAnimationsModule,
MaterialModule,
NgxsModule.forRoot([SessionState]),
NgxsFormPluginModule.forRoot(),
ToastrModule.forRoot(),
],
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: ErrorInterceptor,
multi: true,
}
]
});
interceptor = TestBed.get(ErrorInterceptor);
toastr = TestBed.get(ToastrService);
toastrSpy = spyOn(toastr, 'error').and.callThrough();
backend = TestBed.get(HttpTestingController);
client = TestBed.get(HttpClient);
store = TestBed.get(Store);
actions = TestBed.get(Actions);
}));
示例4: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
NoopAnimationsModule,
MaterialModule,
HttpClientTestingModule,
NgxsModule.forRoot([AppState]),
ReactiveFormsModule
],
declarations: [ConfirmDialogComponent],
providers: [
{provide: MAT_DIALOG_DATA, useValue: {}},
{
provide: MatDialogRef, useValue: {
afterClosed: () => of(null),
backdropClick: () => of(null),
close: () => of(null),
updateSize: () => of(null)
}
}
]
});
fixture = TestBed.createComponent(ConfirmDialogComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
示例5: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
RouterTestingModule,
MaterialModule,
FormsModule,
FormHelperModule,
ReactiveFormsModule,
HttpClientTestingModule,
NgxsModule.forRoot([AppState, BrowseStoragesState]),
ToastrModule.forRoot()
],
providers: [
StorageManagerService,
{provide: MAT_DIALOG_DATA, useValue: {}},
{
provide: MatDialogRef, useValue: {
afterClosed: () => of(null),
backdropClick: () => of(null),
close: () => of(null),
updateSize: () => of(null)
}
}
],
declarations: [StorageFormDialogComponent]
}).compileComponents();
}));
示例6: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
BrowserAnimationsModule,
MaterialModule,
LayoutModule,
HttpClientTestingModule,
NgxsModule.forRoot([]),
],
declarations: [BrowseComponent]
}).compileComponents();
}));
示例7: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [DashboardComponent],
imports: [
ReactiveFormsModule,
NgxsModule.forRoot([
ObsState,
ScenesState,
SourcesState,
TransitionState
])
]
});
});
示例8: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [PanelEditComponent],
imports: [
ReactiveFormsModule,
AceEditorModule,
NgxsModule.forRoot([EnvironmentState, CaptionItemsState])
],
providers: [
{ provide: AuthService, useValue: FakeAuthService },
{ provide: CaptionService, useValue: fakeCaptionService },
{ provide: AngularFirestore, useValue: AngularFirestoreSpy }
]
}).compileComponents();
}));
示例9: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
providers: [
EditableGuard,
{ provide: AngularFirestore, useValue: FakeAngularFirestore }
],
imports: [
HttpClientTestingModule,
RouterTestingModule,
NgxsModule.forRoot([EnvironmentState])
]
});
guard = TestBed.get(EditableGuard);
});
示例10: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
HttpClientTestingModule,
NgxsModule.forRoot([SessionState]),
],
providers: [
ManageSettingsGuard,
AuthService
]
}).compileComponents(); // compile template and css
guard = TestBed.get(ManageSettingsGuard);
store = TestBed.get(Store);
});