當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript store.NgxsModule類代碼示例

本文整理匯總了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();
 }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:33,代碼來源:manage-repository.component.spec.ts

示例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');
        });
    }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:30,代碼來源:browse-repository.component.spec.ts

示例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);
    }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:30,代碼來源:error.interceptor.spec.ts

示例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();
    });
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:28,代碼來源:confirm.dialog.component.spec.ts

示例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();
 }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:28,代碼來源:storage-form.dialog.component.spec.ts

示例6: beforeEach

 beforeEach(async(() => {
     TestBed.configureTestingModule({
         imports: [
             RouterTestingModule,
             BrowserAnimationsModule,
             MaterialModule,
             LayoutModule,
             HttpClientTestingModule,
             NgxsModule.forRoot([]),
         ],
         declarations: [BrowseComponent]
     }).compileComponents();
 }));
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:13,代碼來源:browse.component.spec.ts

示例7: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     declarations: [DashboardComponent],
     imports: [
       ReactiveFormsModule,
       NgxsModule.forRoot([
         ObsState,
         ScenesState,
         SourcesState,
         TransitionState
       ])
     ]
   });
 });
開發者ID:chgc,項目名稱:stream-tools,代碼行數:14,代碼來源:dashboard.component.spec.ts

示例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();
 }));
開發者ID:chgc,項目名稱:stream-tools,代碼行數:15,代碼來源:panel-edit.component.spec.ts

示例9: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        EditableGuard,
        { provide: AngularFirestore, useValue: FakeAngularFirestore }
      ],
      imports: [
        HttpClientTestingModule,
        RouterTestingModule,
        NgxsModule.forRoot([EnvironmentState])
      ]
    });

    guard = TestBed.get(EditableGuard);
  });
開發者ID:chgc,項目名稱:stream-tools,代碼行數:15,代碼來源:editable.guard.spec.ts

示例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);
    });
開發者ID:strongbox,項目名稱:strongbox-web-ui,代碼行數:15,代碼來源:manage-settings.guard.spec.ts


注:本文中的@ngxs/store.NgxsModule類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。