本文整理汇总了TypeScript中@angular/material.MaterialModule类的典型用法代码示例。如果您正苦于以下问题:TypeScript MaterialModule类的具体用法?TypeScript MaterialModule怎么用?TypeScript MaterialModule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MaterialModule类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: beforeEach
beforeEach(async(() => {
const fakeLocalStorageService = {
store: (nick: string) => nick,
};
const fakeRouter = {
navigate: (commands: any) => commands,
};
TestBed.configureTestingModule({
declarations: [
EntryComponent,
],
imports: [
FormsModule,
Ng2Webstorage,
MaterialModule.forRoot(),
],
providers: [
AnimationsService,
{
provide: LocalStorageService,
useValue: fakeLocalStorageService,
},
{
provide: Router,
useValue: fakeRouter,
},
]
})
.compileComponents();
}));
示例2: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [MaterialModule.forRoot(), FormsModule],
declarations: [PublishComponent], // declare the test component
providers: [{ provide: AppClientService, useValue: app }, MdSnackBar]
}).compileComponents();
}));
示例3: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
imports: [ RouterTestingModule, MaterialModule.forRoot() ]
});
});
示例4: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [
AboutListComponent,
],
imports: [
MaterialModule.forRoot(),
],
})
.compileComponents();
}));
示例5: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [StoreModule.provideStore({ employerStore: reducer }, {}),
MaterialModule.forRoot(), RouterModule.forRoot(routes)],
declarations: [SidebarSummaryComponent],
providers: [
{ provide: APP_BASE_HREF, useValue: '/' }
]
})
.compileComponents();
}));
示例6: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [FormsModule, MaterialModule.forRoot(), RouterTestingModule.withRoutes(config)],
declarations: [TestComponent,
AppComponent,
AboutComponent],
providers: [
{ provide: APP_BASE_HREF, useValue: '/' }
]
});
});
示例7: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
MaterialModule.forRoot(),
ReactiveFormsModule,
RouterTestingModule.withRoutes(routes),
StoreDevToolsModule
],
providers: [],
declarations: [AppComponent, HomeComponent, NotFound404Component]
});
});
示例8: beforeEach
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [
AppComponent
],
imports: [HttpModule, RouterModule.forRoot(routes), MaterialModule.forRoot()],
providers: [{ provide: RegDataService, useClass: mockRegDataSvc },
{ provide: APP_BASE_HREF, useValue: '/' }, {
provide: AuthService, useClass: mockAuthSvc
}, MenuItems],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
});
TestBed.compileComponents();
});
示例9: 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();
});
示例10: beforeEach
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [ReactiveFormsModule, DynamicFormsCoreModule.forRoot(), MaterialModule.forRoot()],
declarations: [DynamicFormMaterialComponent]
}).compileComponents().then(() => {
fixture = TestBed.createComponent(DynamicFormMaterialComponent as Type<DynamicFormMaterialComponent>);
component = fixture.componentInstance;
debugElement = fixture.debugElement;
});
}));