I am created a shared module like below. I have read somewhere that import order matters and i cannot find that link now. At some places its working fine but at other places i am getting error. I want to know the order these modules are required to avoid any error.
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import 'hammerjs';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { MaterialModule } from '@angular/material';
import { FlexLayoutModule } from '@angular/flex-layout';
import { CoreModule } from './core/core.module';
// NOTE: The import order matters.
const modules = [
CommonModule,
CoreModule,
ReactiveFormsModule,
FormsModule,
HttpClientModule,
MaterialModule,
FlexLayoutModule,
];
@NgModule({
imports: modules,
exports: modules
})
export class DependenciesModule { }