title: Angular4: Node is throwing a reference error: navigator is not defined when I add <md-sidenav>
body: <p>I'm using Angular 4 and angular/material. MdToolbar works fine, but when I add MdSidenav to my app template just like the documentation states Node gives me a ReferenceError: navigator is not defined. anyone experience anything similar?</p>
  
  <p>src/app.component.html</p>
  
  <pre><code>&lt;md-sidenav-container&gt;
  
  &lt;layout-header&gt;
      &lt;nav-bar&gt;&lt;/nav-bar&gt;
      &lt;!-- TODO: Create nav component --&gt;
      &lt;a routerLink="/"&gt;Home&lt;/a&gt;
      &lt;a routerLink="/about"&gt;About&lt;/a&gt;
      &lt;a routerLink="/lazy"&gt;Lazy&lt;/a&gt;
      &lt;a routerLink="/lazy2"&gt;Lazy 2&lt;/a&gt;
      &lt;a routerLink="/user-profile"&gt;User Profile&lt;/a&gt;
      &lt;a routerLink="/test-rest"&gt;Test Rest&lt;/a&gt;
      &lt;a routerLink="/test-route-params"&gt;Test Route Params&lt;/a&gt;
  &lt;/layout-header&gt;
  
  &lt;md-sidenav #sidenav class="sidenav"&gt;
      &lt;ul&gt;
          &lt;li&gt;Search&lt;/li&gt;
          &lt;li&gt;Start a Group&lt;/li&gt;
          &lt;li&gt;App Settings&lt;/li&gt;
          &lt;li&gt;About&lt;/li&gt;
          &lt;li&gt;Help&lt;/li&gt;
          &lt;li&gt;Logout&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/md-sidenav&gt;
  
  &lt;!--primary router outlet: a dynamic component that the router uses to 
  display--&gt;
  &lt;router-outlet&gt;&lt;/router-outlet&gt;
  
  &lt;!-- TODO: Issue with event not emitting via onShown/onHidden --&gt;
  &lt;!-- Ref: https://github.com/valor-software/ngx-bootstrap/issues/1886 --&gt;
  &lt;app-dialog (dynamicComponent)="onDialogLoad($event)" (onShown)="test()" 
  (onHidden)="test2()"&gt;&lt;/app-dialog&gt;
  
  &lt;!--TODO: example; Delete--&gt;
  &lt;button (click)="create()"&gt;Create&lt;/button&gt;
  &lt;simple-notifications [options]="options"&gt;&lt;/simple-notifications&gt;
  
  &lt;layout-footer&gt;&lt;/layout-footer&gt;
  &lt;/md-sidenav-container&gt;
  </code></pre>
  
  <p>src/app.module.ts</p>
  
  <pre><code>@NgModule({
  imports: [
      CommonModule,
      FormsModule,
      ReactiveFormsModule,
      HttpModule,
      TransferHttpModule,
      NgReduxModule,
      MdToolbarModule,
      MdSidenavModule,
      MdIconModule,
      MdCardModule,
      MdInputModule,
      MdButtonModule,
      DialogModule.forRoot([LoginForm]),
      SimpleNotificationsModule.forRoot(), // TODO: remove; testing only
      RouterModule.forRoot(AppRoutes)
  ],
  providers: [ AuthGuard, DialogService ],
  declarations: [
      AppComponent,
      HomeView,
      AboutComponent,
      HeaderComponent,
      FooterComponent,
      NavBarComponent,
      LoginForm,
      SideNavComponent
  ],
  exports: [ AppComponent ],
  bootstrap : [ AppComponent ]
  </code></pre>
  
  <p>})
  export class AppModule {}</p>
  
  <p>NodeJS error </p>
  
  <p>ERROR { ReferenceError: navigator is not defined
      at new Platform (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/material/bundles/material.umd.js:3396:36)
      at ServerAppModuleInjector.get (ng:///ServerAppModule/module.ngfactory.js:177:61)
      at ServerAppModuleInjector.get (ng:///ServerAppModule/module.ngfactory.js:182:120)
      at ServerAppModuleInjector.get (ng:///ServerAppModule/module.ngfactory.js:187:108)
      at ServerAppModuleInjector.getInternal (ng:///ServerAppModule/module.ngfactory.js:477:56)
      at ServerAppModuleInjector.NgModuleInjector.get (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:3563:44)
      at resolveDep (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:10931:45)
      at createClass (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:10795:147)
      at createDirectiveInstance (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:10628:37)
      at createViewNodes (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:11978:49)
      at callViewAction (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:12348:13)
      at execComponentViewsAction (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:12287:13)
      at createViewNodes (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:12005:5)
      at createRootView (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:11883:5)
      at Object.createProdRootView [as createRootView] (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:12461:12)
      at ComponentFactory_.create (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:9819:46)
      at ComponentFactoryBoundToModule.create (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:3434:29)
      at ApplicationRef_.bootstrap (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:5016:57)
      at /Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:4803:79
      at Array.forEach (native)
      at PlatformRef_._moduleDoBootstrap (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:4803:42)
      at /Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:4765:27
      at ZoneDelegate.invoke (/Users/lsorensen/code/OneUnionV1/node_modules/zone.js/dist/zone-node.js:365:26)
      at Object.onInvoke (/Users/lsorensen/code/OneUnionV1/node_modules/@angular/core/bundles/core.umd.js:4132:37)
      at ZoneDelegate.invoke (/Users/lsorensen/code/OneUnionV1/node_modules/zone.js/dist/zone-node.js:364:32)
      at Zone.run (/Users/lsorensen/code/OneUnionV1/node_modules/zone.js/dist/zone-node.js:125:43)
      at /Users/lsorensen/code/OneUnionV1/node_modules/zone.js/dist/zone-node.js:758:57</p>