title: Need BrowserAnimationsModule in Angular but gives error in Universal
body: <p>Hi I am using Angular that uses the BrowserAnimationsModule. But in the universal server side it gives the error "document is not defined".</p>
  
  <p>Because Universal doesn't support BrowserAnimationsModule I need a way to make the server ignore BrowserAnimationsModule and replace it with NoopAnimationsModule.</p>
  
  <p>This is what I have right now but it's not working. Any other methods are welcome too.</p>
  
  <pre><code>let imports = [
      BrowserModule.withServerTransition({appId: 'ang4-seo'}),
      FormsModule,
      HttpModule,
      routes
  ];
  
  if(isPlatformBrowser(PLATFORM_ID)){
      imports.push(BrowserAnimationsModule);
  }
  
  @NgModule({
      imports: imports,
  </code></pre>
  
  <p>Are there any ways to solve this?</p>