UNPKG

753 BMarkdownView Raw
1The `core` entrypoint contains all of the common utilities to build Layout
2components. Its primary exports are the `MediaQuery` utility
3`MediaObserver` and the module that encapsulates the imports of these
4providers, the `CoreModule`, and the base directive for layout
5components, `BaseDirective2`. These utilities can be imported separately
6from the root module to take advantage of tree shaking.
7
8```typescript
9import {NgModule} from '@angular/core';
10import {CoreModule} from '@angular/flex-layout/core';
11
12@NgModule(({
13 imports: [
14 ... other imports here
15 CoreModule,
16 ]
17}))
18export class AppModule {}
19```
20
21```typescript
22import {BaseDirective2} from '@angular/flex-layout/core';
23
24export class NewLayoutDirective extends BaseDirective2 {}
25```