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


TypeScript angular-calendar.CalendarModule類代碼示例

本文整理匯總了TypeScript中angular-calendar.CalendarModule的典型用法代碼示例。如果您正苦於以下問題:TypeScript CalendarModule類的具體用法?TypeScript CalendarModule怎麽用?TypeScript CalendarModule使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了CalendarModule類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: beforeEach

  beforeEach(async(() => {
    const dialogRefMock = new MatDialogRefMock();
    const dialogSpy = jasmine.createSpyObj('MatDialog', ['open']);
    dialogSpy.open.and.callFake(() => dialogRefMock);

    const lessonServiceSpy = jasmine.createSpyObj<LessonService>(['getLessons', 'addLesson', 'updateLesson']);
    lessonServiceSpy.getLessons.and.callFake(() => of(lessons));
    lessonServiceSpy.addLesson.and.callFake(() => of({}));
    lessonServiceSpy.updateLesson.and.callFake(() => of({}));

    TestBed.configureTestingModule({
      imports: [
        NoopAnimationsModule,
        AppMaterialModule,
        CalendarModule.forRoot({
          provide: DateAdapter,
          useFactory: adapterFactory
        })
      ],
      declarations: [
        CalendarComponent,
        CalendarHeaderStubComponent,
        LoadingIndicatorStubComponent
      ],
      providers: [
        { provide: MatDialog, useValue: dialogSpy },
        { provide: MatDialogRef, useValue: dialogRefMock },
        { provide: LessonService, useValue: lessonServiceSpy },
        { provide: CalendarEventTitleFormatter, useClass: LessonTitleFormatter }
      ]
    })
    .compileComponents();
  }));
開發者ID:vgebrev,項目名稱:Tesli,代碼行數:33,代碼來源:calendar.component.spec.ts

示例2: beforeEach

  beforeEach(() => {
    TestBed.configureTestingModule({
      imports: [
        BrowserModule,
        FormsModule,
        HttpModule,
        MaterializeModule,
        MaterialModule.forRoot(),
        RouterTestingModule,
        CalendarModule.forRoot(),
        DragulaModule,
        EditorModule,
        ReCaptchaModule,
      ],
      declarations: [
        AppComponent,
        PresentationComponent,
        DashboardComponent,
        CourseDetailsComponent,
        NavbarComponent,
        FooterComponent,
        LoginModalComponent,
        SettingsComponent,
        ErrorMessageComponent,
        CommentComponent,
        FileGroupComponent,
        CalendarComponent,
        TimeAgoPipe,
        FileSelectDirective,
        FileDropDirective,
        VideoSessionComponent,
        FileUploaderComponent,
        StreamComponent,
        ChatLineComponent,
      ],
      providers: [
        { provide: AuthenticationService, useClass: MockAuthenticationService },
        { provide: LoginModalService, useClass: MockLoginModalService },
      ]
    });

    fixture = TestBed.createComponent(NavbarComponent);
    comp = fixture.componentInstance;

    de1 = fixture.debugElement.query(By.css('#logo-container'));
    el1 = de1.nativeElement;

    fixture.detectChanges();
  });
開發者ID:gabrielTaSa,項目名稱:full-teaching,代碼行數:49,代碼來源:navbar.component.spec.ts

示例3: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       BrowserModule,
       FormsModule,
       HttpModule,
       MaterializeModule,
       MaterialModule.forRoot(),
       RouterTestingModule,
       CalendarModule.forRoot(),
       DragulaModule,
       EditorModule,
       ReCaptchaModule,
     ],
     declarations: [
       AppComponent,
       PresentationComponent,
       DashboardComponent,
       CourseDetailsComponent,
       NavbarComponent,
       FooterComponent,
       LoginModalComponent,
       SettingsComponent,
       ErrorMessageComponent,
       CommentComponent,
       FileGroupComponent,
       CalendarComponent,
       TimeAgoPipe,
       FileSelectDirective,
       FileDropDirective,
       VideoSessionComponent,
       FileUploaderComponent,
       StreamComponent,
       ChatLineComponent,
     ],
   });
 });
開發者ID:gabrielTaSa,項目名稱:full-teaching,代碼行數:37,代碼來源:app.component.spec.ts


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