Skip to content
This repository has been archived by the owner on Nov 6, 2024. It is now read-only.

Commit

Permalink
Update README.md MaterializeModule section (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
scote authored and jfcere committed Nov 28, 2017
1 parent 1d8b6c0 commit 16751a2
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,26 +163,27 @@ export class HomeModule { }
```


### Alternative
As an alternative, you can import `MaterializeModule` to make all component availables. This module is **deprecated** and it will be removed in a near future.

```diff
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
+ import { MaterializeModule } from 'ng2-materialize';


import { HomeComponent } from './home.component';

@NgModule({
imports: [
CommonModule,
+ MaterializeModule.forRoot(),
],
declarations: [ HomeComponent ],
})
export class HomeModule { }
```
### MaterializeModule deprecated
We will continue to maintain this module for a period of time to allow you to migrate your existing components to the new way.
We recommend to use the new component modules when you are building new component/application.

If you still want to import only one module, you can create a separate `NgModule` in your application that imports all the `ng2-materialize` components. You will be able to include this module anywhere you like to use the components.

```
import { MzInputModule, MzValidationModule } from 'ng2-materialize';
@NgModule({
imports: [
MzInputModule,
MzValidationModule,
],
exports: [
MzInputModule,
MzValidationModule,
],
})
export class CustomMaterializeModule { }
```

## Available features

Expand Down

0 comments on commit 16751a2

Please sign in to comment.