title: Can't bind to 'ngStyle' since it isn't a known property of 'div' when CommonModule has been imported
body: <p>I have a component:</p>
  
  <pre><code>import { Component, Input } from '@angular/core';
  
  @Component({
    selector: 'my-menu',
    templateUrl: './my-menu.component.html'
  })
  export class MenuComponent {
    //some code here
  }
  </code></pre>
  
  <p>I use that component in multiple modules, so that's why I have a SharedModule in which I export it:</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { MenuComponent } from './my-menu/my-menu.component';
  import { CommonModule } from '@angular/common';
  
  @NgModule({
    imports: [CommonModule],
    declarations: [ MenuComponent ],
    exports: [ MenuComponent, CommonModule ],
  })
  export class SharedModule {}
  </code></pre>
  
  <p>And I use the SharedModule in multiple modules that are basically similar to this:</p>
  
  <pre><code>import { TestComponent } from './test.component';
  import { Injector, DoBootstrap, NgModule } from '@angular/core';
  import { createCustomElement } from '@angular/elements';
  import { BrowserModule } from '@angular/platform-browser';
  import { SharedModule } from '../shared/shared.module';
  import { CommonModule } from '@angular/common';
  
  @NgModule({
    declarations: [TestComponent],
    imports: [BrowserModule, FormsModule, HttpClientModule, SharedModule, CommonModule],
    entryComponents: [TestComponent],
    providers: [],
    exports: []
  })
  export class TestModule implements DoBootstrap {
    constructor(private injector: Injector) { }
  
    ngDoBootstrap() {
      const ngElement = createCustomElement(TestComponent, { injector: this.injector, });
      customElements.get('my-test') || customElements.define('my-test', ngElement);
    }
  }
  </code></pre>
  
  <p>However when I run the ng build command, I get the error: Can't bind to 'ngStyle' since it isn't a known property of 'div', which happens in file my-menu.component.html. This component has already been working correctly before I added the shared module. What am I doing wrong?</p>