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