@angular/cdk/layout#LayoutModule TypeScript Examples
The following examples show how to use
@angular/cdk/layout#LayoutModule.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: dashboard.component.spec.ts From barista with Apache License 2.0 | 6 votes |
// tslint:enable:max-line-length
describe('DashboardComponent', () => {
let component: DashboardComponent;
let fixture: ComponentFixture<DashboardComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [DashboardComponent, ProjectsComponent, ProjectStatusNormalComponent, ModuleSearchComponent],
imports: [
NoopAnimationsModule,
RouterTestingModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
HttpClientTestingModule,
LayoutModule,
NgxDatatableModule,
AppMaterialModule,
AppComponentsModule,
],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DashboardComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should compile', () => {
expect(component).toBeTruthy();
});
});
Example #2
Source File: home.component.spec.ts From barista with Apache License 2.0 | 6 votes |
describe('HomeComponent', () => {
let component: HomeComponent;
let fixture: ComponentFixture<HomeComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ HomeComponent, ProjectsComponent, ProjectStatusNormalComponent, ModuleSearchComponent],
imports: [
NoopAnimationsModule,
RouterTestingModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
HttpClientTestingModule,
LayoutModule,
NgxDatatableModule,
AppMaterialModule,
AppComponentsModule,
],
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
Example #3
Source File: dynamic-menu.component.spec.ts From barista with Apache License 2.0 | 6 votes |
describe('DynamicMenuComponent', () => {
let component: DynamicMenuComponent;
let fixture: ComponentFixture<DynamicMenuComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
HttpClientTestingModule,
LayoutModule,
AppMaterialModule,
],
declarations: [DynamicMenuComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DynamicMenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
Example #4
Source File: help-menu.component.spec.ts From barista with Apache License 2.0 | 6 votes |
describe('HelpMenuComponent', () => {
let component: HelpMenuComponent;
let fixture: ComponentFixture<HelpMenuComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
HttpClientModule,
FormsModule,
ReactiveFormsModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
HttpClientTestingModule,
LayoutModule,
AppMaterialModule,
],
declarations: [HelpMenuComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HelpMenuComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
Example #5
Source File: app.module.ts From travel-list with MIT License | 6 votes |
@NgModule({
declarations: [
AppComponent,
TravelListComponent,
TravelTabsComponent,
NewComponent,
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
HttpClientModule,
LayoutModule,
MatToolbarModule,
MatButtonModule,
MatSidenavModule,
MatIconModule,
MatListModule,
MatCardModule,
MatTabsModule,
MatDialogModule,
MatFormFieldModule,
MatInputModule,
FormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule {
}
Example #6
Source File: app.module.ts From flingo with MIT License | 6 votes |
@NgModule({
declarations: [AppComponent, AppBreadcrumbComponent, FullComponent, AppSidebarComponent, SpinnerComponent],
imports: [
BrowserModule,
BrowserAnimationsModule,
MatMenuModule,
MatIconModule,
MatButtonModule,
LayoutModule,
SharedModule,
RouterModule.forRoot(AppRoutes, { relativeLinkResolution: 'legacy' }),
MatSidenavModule,
FlexLayoutModule,
MatToolbarModule,
MatListModule,
MatProgressBarModule,
SpinnerModule
],
bootstrap: [AppComponent]
})
export class AppModule {}
Example #7
Source File: app.module.ts From WiLearning with GNU Affero General Public License v3.0 | 6 votes |
@NgModule({
declarations: [
AppComponent,
NavComponent,
RoomComponent,
AddroomComponent,
RoomlinkComponent,
SigninComponent,
MonitorComponent
],
imports: [
BrowserModule,
AppRoutingModule,
BrowserAnimationsModule,
LayoutModule,
QuillModule.forRoot(),
SharedModule,
],
entryComponents: [
AddroomComponent,
RoomlinkComponent,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Example #8
Source File: shared.module.ts From WiLearning with GNU Affero General Public License v3.0 | 6 votes |
@NgModule({
imports: [
CommonModule,
FormsModule,
FlexLayoutModule,
LayoutModule,
OverlayModule,
PortalModule,
DragDropModule,
ReactiveFormsModule,
HttpClientModule,
MaterialComponentsModule
],
exports: [
CommonModule,
FormsModule,
FlexLayoutModule,
LayoutModule,
OverlayModule,
PortalModule,
DragDropModule,
ReactiveFormsModule,
HttpClientModule,
MaterialComponentsModule
]
})
export class SharedModule {}
Example #9
Source File: nav.component.spec.ts From WiLearning with GNU Affero General Public License v3.0 | 6 votes |
describe('NavComponent', () => {
let component: NavComponent;
let fixture: ComponentFixture<NavComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [NavComponent],
imports: [
NoopAnimationsModule,
LayoutModule,
MatButtonModule,
MatIconModule,
MatListModule,
MatSidenavModule,
MatToolbarModule,
]
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(NavComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should compile', () => {
expect(component).toBeTruthy();
});
});
Example #10
Source File: app.component.spec.ts From barista with Apache License 2.0 | 5 votes |
describe('AppComponent', () => {
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
AppMaterialModule,
HttpClientModule,
AppComponentsModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
HttpClientTestingModule,
LayoutModule,
],
declarations: [AppComponent, HeaderComponent, FooterComponent, SideNavComponent],
providers: [
NavService,
{
provide: AuthService,
useValue: {
userInfo: jest.fn().mockReturnValueOnce({ role: 'Admin' }),
},
},
],
}).compileComponents();
}));
it('should create the app', () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title 'barista-web'`, () => {
const fixture = TestBed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual('barista-web');
});
it('should render title in a h1 tag', () => {
const fixture = TestBed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector('h1 span').textContent).toContain('Barista');
});
});
Example #11
Source File: header.component.spec.ts From barista with Apache License 2.0 | 5 votes |
describe('HeaderComponent', () => {
let component: HeaderComponent;
let fixture: ComponentFixture<HeaderComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
RouterTestingModule,
AppMaterialModule,
HttpClientModule,
AppComponentsModule,
FormsModule,
ReactiveFormsModule,
StoreModule.forRoot({}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
HttpClientTestingModule,
LayoutModule,
],
declarations: [HeaderComponent],
providers: [
NavService,
{
provide: AuthService,
useValue: {
userInfo: jest.fn().mockReturnValueOnce({ role: 'Admin' }),
},
},
],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HeaderComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
Example #12
Source File: app.module.ts From barista with Apache License 2.0 | 4 votes |
@NgModule({
declarations: [
AppComponent,
BillOfMaterialsComponent,
BomGroupedLicenseModulesComponent,
BomGroupedLicensesComponent,
BomGroupedLicenseModulesDialogComponent,
BomLicenseExceptionDetailsComponent,
BomLicenseExceptionDetailsDialogComponent,
BomLicenseExceptionsComponent,
BomLicensesComponent,
BomManualLicenseDetailsComponent,
BomManualLicenseDetailsDialogComponent,
BomManualLicensesComponent,
BomSecurityExceptionComponent,
BomSecurityExceptionDetailsComponent,
BomSecurityExceptionDetailsDialogComponent,
BomVulnerabilitiesComponent,
DashboardComponent,
FlexLayoutTypeComponent,
FooterComponent,
githubValidDirective,
HeaderComponent,
HomeComponent,
LicenseDetailsComponent,
LicenseObligationComponent,
LicenseScanResultComponent,
LicenseScanResultItemDetailsComponent,
LicenseScanResultItemsComponent,
LicensesComponent,
LicensesExceptionsComponent,
ModuleSearchComponent,
ObjectDetailsComponent,
ObligationDetailsComponent,
ObligationDetailsViewComponent,
ObligationsComponent,
OutputFormatComponent,
OutputFormatTypeDetailsComponent,
PackageManagerDetailsComponent,
PackageManagersComponent,
ProjectAttributionComponent,
ProjectDetailsComponent,
ProjectNotesComponent,
ProjectNotesDetailsComponent,
ProjectNotesDetailsDialogComponent,
ProjectScanDetailsComponent,
ProjectScansComponent,
ProjectStatsComponent,
ProjectStatusComponent,
ProjectStatusNormalComponent,
ProjectStatusTypeDetailsComponent,
ProjectStatusTypesComponent,
ProjectsComponent,
ScanLogsComponent,
SecurityScanResultComponent,
SecurityScanResultItemDetailsComponent,
SecurityScanResultItemsComponent,
SideNavComponent,
SigninComponent,
SignupComponent,
StatusComponent,
SystemConfigurationComponent,
TooltipsComponent,
TooltipDetailsComponent,
VulnerabilityStatusDeploymentTypesComponent,
VulnerabilityStatusDeploymentTypesDetailsComponent,
BannerComponent,
ChartGaugeComponent,
ChartBarHorizontalComponent,
ChartBarVerticalComponent,
],
imports: [
StoreModule.forRoot(
{},
{
runtimeChecks: {
strictStateImmutability: true,
strictActionImmutability: true,
strictActionSerializability: true,
},
},
),
// Instrumentation must be imported after importing StoreModule (config is optional)
StoreDevtoolsModule.instrument({
maxAge: 25, // Retains last 25 states
logOnly: environment.production, // Restrict extension to log-only mode
}),
EffectsModule.forRoot([]),
EntityDataModule.forRoot(entityConfig),
EntityStoreModule,
BrowserModule,
ApiModule.forRoot(apiConfigFactory),
HttpClientModule,
AppRoutingModule,
FormsModule,
ReactiveFormsModule,
FlexLayoutModule,
FormlyModule.forRoot({
types: [{ name: 'flex-layout', component: FlexLayoutTypeComponent }],
}),
FormlyMaterialModule,
LayoutModule,
AppMaterialModule,
NgxDatatableModule,
TableModule,
MultiSelectModule,
AppComponentsModule,
TrustHtmlModule,
SafePipeModule,
PrettyJsonModule,
DashboardModule,
AppServicesModule,
],
providers: [
HttpCancelService,
{ provide: HTTP_INTERCEPTORS, useClass: ManageHttpInterceptor, multi: true },
{ provide: BASE_PATH, useValue: environment.API_BASE_PATH },
NavService,
{
provide: HTTP_INTERCEPTORS,
useFactory: (router: Router, authService: AuthService) => {
return new AuthInterceptor(router, authService);
},
multi: true,
deps: [Router, AuthService],
},
],
bootstrap: [AppComponent],
entryComponents: [
AppDialogComponent,
BomLicenseExceptionDetailsDialogComponent,
BomManualLicenseDetailsDialogComponent,
BomSecurityExceptionDetailsDialogComponent,
ProjectNotesDetailsDialogComponent,
BomGroupedLicenseModulesDialogComponent,
],
})
export class AppModule {}