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


TypeScript material.MaterialModule類代碼示例

本文整理匯總了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();
  }));
開發者ID:tarlepp,項目名稱:Angular2-Firebase-Material-Demo,代碼行數:32,代碼來源:entry.component.spec.ts

示例2: beforeEach

 beforeEach(async(() => {
     TestBed.configureTestingModule({
         imports: [MaterialModule.forRoot(), FormsModule],
         declarations: [PublishComponent], // declare the test component
         providers: [{ provide: AppClientService, useValue: app }, MdSnackBar]
     }).compileComponents();
 }));
開發者ID:csongysun,項目名稱:HJPT.f,代碼行數:7,代碼來源:publish.component.spec.ts

示例3: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     declarations: [
       AppComponent
     ],
     imports: [ RouterTestingModule, MaterialModule.forRoot() ]
   });
 });
開發者ID:idugalic,項目名稱:micro-company,代碼行數:8,代碼來源:app.component.spec.ts

示例4: beforeEach

 beforeEach(async(() => {
   TestBed.configureTestingModule({
     declarations: [
       AboutListComponent,
     ],
     imports: [
       MaterialModule.forRoot(),
     ],
   })
   .compileComponents();
 }));
開發者ID:padamshrestha,項目名稱:angular2-firebase-material-demo,代碼行數:11,代碼來源:about-list.component.spec.ts

示例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();
 }));
開發者ID:mnitdeed,項目名稱:angular2-nativescript-auth0,代碼行數:11,代碼來源:sidebar-summary.component.spec.ts

示例6: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [FormsModule, MaterialModule.forRoot(), RouterTestingModule.withRoutes(config)],
     declarations: [TestComponent,
       AppComponent,
       AboutComponent],
     providers: [
       { provide: APP_BASE_HREF, useValue: '/' }
     ]
   });
 });
開發者ID:padamshrestha,項目名稱:angular2-material-seed,代碼行數:11,代碼來源:app.component.spec.ts

示例7: beforeEach

 beforeEach(() => {
   TestBed.configureTestingModule({
     imports: [
       MaterialModule.forRoot(),
       ReactiveFormsModule,
       RouterTestingModule.withRoutes(routes),
       StoreDevToolsModule
       ],
     providers: [],
     declarations: [AppComponent, HomeComponent, NotFound404Component]
   });
 });
開發者ID:Ecafracs,項目名稱:flatthirteen,代碼行數:12,代碼來源:app.component.spec.ts

示例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();
 });
開發者ID:mnitdeed,項目名稱:angular2-nativescript-auth0,代碼行數:14,代碼來源:app.component.spec.ts

示例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();
  });
開發者ID:gabrielTaSa,項目名稱:full-teaching,代碼行數:49,代碼來源:navbar.component.spec.ts

示例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;
        });
    }));
開發者ID:CodeFork,項目名稱:ng2-dynamic-forms,代碼行數:15,代碼來源:dynamic-form-material.component.spec.ts


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