11/*
2- * _Common_ NgModule to share between Browser & Server platforms
2+ * _Common_ NgModule to share between our "BASE" App. Browser & App. Server module platforms
33 *
44 * If something belongs to BOTH, just put it Here.
55 * - If you need something to be very "platform"-specific, put it
66 * in the specific one (app.browser or app.server)
77 */
88
99import { NgModule } from '@angular/core' ;
10- import { CommonModule } from '@angular/common' ;
11- import { FormsModule , ReactiveFormsModule } from '@angular/forms' ;
1210import { RouterModule } from '@angular/router' ;
1311
1412import { Store , StoreModule } from '@ngrx/store' ;
@@ -17,7 +15,7 @@ import { EffectsModule } from '@ngrx/effects';
1715import { Ng2BootstrapModule } from 'ng2-bootstrap/ng2-bootstrap' ;
1816
1917// Main "APP" Root Component
20- import { AppComponent , ROUTES , appReducer } from 'app' ;
18+ import { BaseSharedModule , AppComponent , ROUTES , appReducer } from 'app' ;
2119
2220// Component imports
2321import { NavMenuComponent } from 'app-components' ;
@@ -47,11 +45,12 @@ import { appState } from 'app';
4745const MODULES = [
4846 // Do NOT include UniversalModule, HttpModule, or JsonpModule here
4947
48+ // This has ALL the "Common" stuff (CommonModule, FormsModule, ReactiveFormsModule, etc etc)
49+ // You would import this into your child NgModules so you don't need to duplicate so much code
50+ BaseSharedModule ,
51+
5052 // Angular
51- CommonModule ,
5253 RouterModule ,
53- FormsModule ,
54- ReactiveFormsModule ,
5554
5655 // NgRx
5756 StoreModule . provideStore ( appReducer , appState ) ,
0 commit comments