本文整理汇总了TypeScript中angular-calendar.CalendarModule.forRoot方法的典型用法代码示例。如果您正苦于以下问题:TypeScript CalendarModule.forRoot方法的具体用法?TypeScript CalendarModule.forRoot怎么用?TypeScript CalendarModule.forRoot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类angular-calendar.CalendarModule
的用法示例。
在下文中一共展示了CalendarModule.forRoot方法的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();
}));
示例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();
});
示例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,
],
});
});