本文整理匯總了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;
});
}));