title: Bootstrapping multiple components in Angular2
body: <p>My question is inline with this question:
  <a href="https://stackoverflow.com/questions/40662027/error-when-bootstrapping-multiple-angular2-modules">Error when bootstrapping multiple angular2 modules</a></p>
  
  <p>My <strong>index.html</strong> has the following code</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  &lt;app-header&gt;Loading header...&lt;/app-header&gt;
    &lt;app-root&gt;Loading...&lt;/app-root&gt;
    &lt;app-footer&gt;Loading footer...&lt;/app-footer&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>In my <strong>app.module.ts</strong>, I supply those 3 components to bootstrap:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>bootstrap: [AppComponent,HeaderComponent,FooterComponent]</code></pre>
  </div>
  </div>
  </p>
  
  <p>and in my main.ts, I bootstrap them</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>platformBrowserDynamic().bootstrapModule(AppModule);</code></pre>
  </div>
  </div>
  </p>
  
  <p>The application works fine with all the three modules included. When either of them is removed, the app works but I receive few errors in the console[img attached].
  <a href="https://i.stack.imgur.com/g8z6Q.png" rel="noreferrer"><img src="https://i.stack.imgur.com/g8z6Q.png" alt="enter image description here"></a></p>
  
  <p>I am trying to create independent modules within the same component that can be plugged in and out of the application. Like for example, a header, footer and body module. Some pages may not need the header, so I can skip the app-header include.</p>
  
  <p>Is my approach right?</p>