Existing website + angular2 integration with optional component
<p>I have existing website and I got angular2 (cli main.js) on it. </p>

<p>I have got it's main <code>&lt;app&gt;&lt;/app&gt;</code> tag added for main component. </p>

<p>Now I have another component, which is stats component. it will only show if user is logged in. </p>

<p>The problem is, If I don't add <code>&lt;app-stats&gt;&lt;/app-stats&gt;</code> inside <code>&lt;app&gt;&lt;/app&gt;</code> component tag, then it wont render it. </p>

<p>How can I make stats component to be bootstrap without tied to main app component?  So It can be put anywhere on the html page without being inside <code>&lt;app&gt;&lt;/app&gt;</code> and also its optional, if user is not logged in, then it be put inside html code. </p>

<ol>
<li>Freely add <code>&lt;app-stats&gt;&lt;/app-stats&gt;</code> on html page </li>
<li><code>&lt;app-stats&gt;&lt;/app-stats&gt;</code> (optional - will be only added if user is logged in from server side script "php") - I just want to mention it here, because currently if I dont add this tag, then I get error "missing component...."</li>
</ol>