mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
docs(readme): use forRoot() in example module imports. (#1271)
This commit is contained in:
+1
-1
@@ -35,7 +35,7 @@ import { MdButtonModule } from '@angular2-material/button';
|
||||
import { MdCardModule } from '@angular2-material/card';
|
||||
// other imports
|
||||
@NgModule({
|
||||
imports: [MdButtonModule, MdCardModule],
|
||||
imports: [MdButtonModule.forRoot(), MdCardModule.forRoot()],
|
||||
...
|
||||
})
|
||||
```
|
||||
|
||||
@@ -14,7 +14,7 @@ You can read more about button toggles in the
|
||||
Importing the module:
|
||||
```ts
|
||||
@NgModule({
|
||||
imports: [MdButtonToggleModule],
|
||||
imports: [MdButtonToggleModule.forRoot()],
|
||||
...
|
||||
})
|
||||
export class MyAppModule { }
|
||||
|
||||
@@ -14,7 +14,7 @@ To use `md-grid-list`, import the MdGridList module into your application's NgMo
|
||||
import {MdGridListModule} from '@angular2-material/gridlist';
|
||||
|
||||
@NgModule({
|
||||
imports: [MdGridListModule],
|
||||
imports: [MdGridListModule.forRoot()],
|
||||
...
|
||||
})
|
||||
export class MyAppModule {}
|
||||
|
||||
@@ -14,7 +14,7 @@ To use `md-list`, import the MdList module into your application's NgModule:
|
||||
import {MdListModule} from '@angular2-material/list';
|
||||
|
||||
@NgModule({
|
||||
imports: [MdListModule],
|
||||
imports: [MdListModule.forRoot()],
|
||||
...
|
||||
})
|
||||
export class MyAppModule {}
|
||||
|
||||
@@ -20,7 +20,7 @@ Import the MdMenu module.
|
||||
import {MdMenuModule} from '@angular2-material/menu';
|
||||
|
||||
@NgModule({
|
||||
imports: [MdMenuModule],
|
||||
imports: [MdMenuModule.forRoot()],
|
||||
...
|
||||
})
|
||||
export class MyAppModule {}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { MdRadioModule } from '@angular2-material/radio';
|
||||
Adding providers and directives:
|
||||
```ts
|
||||
@NgModule({
|
||||
imports: [MdRadioModule],
|
||||
imports: [MdRadioModule.forRoot()],
|
||||
...
|
||||
})
|
||||
export class MyAppModule { }
|
||||
|
||||
@@ -22,7 +22,7 @@ You can read more about the slider in the
|
||||
Importing the module:
|
||||
```ts
|
||||
@NgModule({
|
||||
imports: [MdSliderModule],
|
||||
imports: [MdSliderModule.forRoot()],
|
||||
...
|
||||
})
|
||||
export class MyAppModule { }
|
||||
|
||||
Reference in New Issue
Block a user