• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

TypeScript store.NgxsModule类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
TypeScript store.StateContext类代码示例发布时间:2022-05-28
下一篇:
TypeScript store.Actions类代码示例发布时间:2022-05-28
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap