Closed windmaomao closed 7 years ago
I think there is no inheritance of the components between the modules, and each module you must provide his own components.
import { MdModule } from 'ng2-md';
import { NgModule } from '@angular/core';
@NgModule({
imports: [ NgModule ]
})
export class BlogModule{}
@NgModule({
imports: [
BrowserModule,
// Third party
MdModule,
// Features
BlogModule
],
})
export class AppModule { }
And forRoot method is for an easy configuration of the module.
After the issue #2 , I was thinking maybe add it for easy configuration of 'ConverterOptions'.
import { MdModule, ConverterOptions, IConverterConstructorOptions } from 'ng2-md';
import { NgModule } from '@angular/core';
@NgModule({
imports: [
MdModule.forRoot({...} as ConverterOptions | IConverterConstructorOptions)
]
})
export class AppModule { }
Maybe I added it to the next release.
I made the change: @56f2186795345dca7f949f4b657a3f689d654426 - add 'forRoot' method to MdModule
@yisraelx, thanks for the component. Very nice.
I run into an issue today. If I define MdModule and include it in AppModule
I couldn't get
md
directive inside BlogModule. Am I doing anything wrong, because I normally get this type of inheritance. I did notice some other module is usingI wonder if this is the reason here.