Separately importing Angular Material modules (wip)

This commit is contained in:
Sercan Yemen 2018-02-23 19:35:28 +03:00
parent 397c304ab2
commit fa53e773ae
8 changed files with 17 additions and 11 deletions

View File

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { MatIconModule } from '@angular/material'; import { MatButtonModule, MatIconModule } from '@angular/material';
import { FuseSearchBarComponent } from './search-bar.component'; import { FuseSearchBarComponent } from './search-bar.component';
@ -14,6 +14,7 @@ import { FuseSearchBarComponent } from './search-bar.component';
CommonModule, CommonModule,
RouterModule, RouterModule,
MatButtonModule,
MatIconModule MatIconModule
], ],
exports : [ exports : [

View File

@ -2,7 +2,7 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { MatDividerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatTooltipModule } from '@angular/material'; import { MatButtonModule, MatDividerModule, MatFormFieldModule, MatIconModule, MatInputModule, MatListModule, MatMenuModule, MatTooltipModule } from '@angular/material';
import { CookieService } from 'ngx-cookie-service'; import { CookieService } from 'ngx-cookie-service';
import { FuseShortcutsComponent } from './shortcuts.component'; import { FuseShortcutsComponent } from './shortcuts.component';
@ -17,6 +17,7 @@ import { FuseShortcutsComponent } from './shortcuts.component';
FlexLayoutModule, FlexLayoutModule,
MatButtonModule,
MatDividerModule, MatDividerModule,
MatFormFieldModule, MatFormFieldModule,
MatIconModule, MatIconModule,

View File

@ -4,9 +4,8 @@ import { CommonModule } from '@angular/common';
import { FlexLayoutModule } from '@angular/flex-layout'; import { FlexLayoutModule } from '@angular/flex-layout';
import { FusePipesModule } from './pipes/pipes.module';
import { FuseDirectivesModule } from '@fuse/directives/directives'; import { FuseDirectivesModule } from '@fuse/directives/directives';
import { FusePipesModule } from '@fuse/pipes/pipes.module';
@NgModule({ @NgModule({
imports : [ imports : [

View File

@ -10,13 +10,14 @@ import { FuseModule } from '@fuse/fuse.module';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';
// import { SharedModule } from 'app/shared/shared.module'; // import { SharedModule } from 'app/shared/shared.module';
import { config } from './config'; import { fuseConfig } from './fuse-config';
import { AppComponent } from './app.component'; import { AppComponent } from './app.component';
import { FuseFakeDbService } from './fuse-fake-db/fuse-fake-db.service'; import { FuseFakeDbService } from './fuse-fake-db/fuse-fake-db.service';
import { FuseMainModule } from './main/main.module'; import { FuseMainModule } from './main/main.module';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { AppStoreModule } from './store/store.module'; import { AppStoreModule } from './store/store.module';
import { MaterialModule } from '@fuse/modules/material.module';
const appRoutes: Routes = [ const appRoutes: Routes = [
{ {
@ -65,9 +66,10 @@ const appRoutes: Routes = [
}), }),
// SharedModule, // SharedModule,
MaterialModule,
// Fuse Main and Shared modules // Fuse Main and Shared modules
FuseModule.forRoot(config), FuseModule.forRoot(fuseConfig),
FuseSharedModule, FuseSharedModule,
AppStoreModule, AppStoreModule,

View File

@ -1,5 +1,5 @@
// Default Fuse config // Default Fuse config
export const config = { export const fuseConfig = {
layout : { layout : {
navigation : 'left', // 'right', 'left', 'top', 'none' navigation : 'left', // 'right', 'left', 'top', 'none'
navigationFolded: false, // true, false navigationFolded: false, // true, false

View File

@ -10,7 +10,7 @@ const routes = [
path : 'dashboards/project', path : 'dashboards/project',
loadChildren: './dashboards/project/project.module#FuseProjectDashboardModule' loadChildren: './dashboards/project/project.module#FuseProjectDashboardModule'
}, },
{ /*{
path : 'dashboards/analytics', path : 'dashboards/analytics',
loadChildren: './dashboards/analytics/analytics.module#FuseAnalyticsDashboardModule' loadChildren: './dashboards/analytics/analytics.module#FuseAnalyticsDashboardModule'
}, },
@ -53,7 +53,7 @@ const routes = [
{ {
path : 'scrumboard', path : 'scrumboard',
loadChildren: './scrumboard/scrumboard.module#FuseScrumboardModule' loadChildren: './scrumboard/scrumboard.module#FuseScrumboardModule'
} }*/
]; ];
@NgModule({ @NgModule({

View File

@ -8,6 +8,7 @@ import { FuseWidgetModule } from '@fuse/components/widget/widget.module';
import { FuseProjectDashboardComponent } from './project.component'; import { FuseProjectDashboardComponent } from './project.component';
import { ProjectDashboardService } from './project.service'; import { ProjectDashboardService } from './project.service';
import { MaterialModule } from '@fuse/modules/material.module';
const routes: Routes = [ const routes: Routes = [
{ {
@ -21,8 +22,9 @@ const routes: Routes = [
@NgModule({ @NgModule({
imports : [ imports : [
FuseSharedModule,
RouterModule.forChild(routes), RouterModule.forChild(routes),
FuseSharedModule,
MaterialModule,
FuseWidgetModule, FuseWidgetModule,
NgxChartsModule NgxChartsModule
], ],

View File

@ -1,6 +1,6 @@
import { NgModule } from '@angular/core'; import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { MatIconModule, MatMenuModule, MatProgressBarModule, MatToolbarModule } from '@angular/material'; import { MatButtonModule, MatIconModule, MatMenuModule, MatProgressBarModule, MatToolbarModule } from '@angular/material';
import { FuseSharedModule } from '@fuse/shared.module'; import { FuseSharedModule } from '@fuse/shared.module';
@ -14,6 +14,7 @@ import { FuseSearchBarModule, FuseShortcutsModule } from '@fuse/components';
imports : [ imports : [
RouterModule, RouterModule,
MatButtonModule,
MatIconModule, MatIconModule,
MatMenuModule, MatMenuModule,
MatProgressBarModule, MatProgressBarModule,