How to remove all views except the login view in Ionic 2?
<p>I made a ionic 2 with tabs by</p>

<pre><code>ionic starts project1 tabs --v2
</code></pre>

<p>then I added a page and a provider:</p>

<pre><code>ionic g provider authService
ionic g page loginPage
</code></pre>

<p>I set root after logged in successful:</p>

<pre><code>this.nav.setRoot(TabsPage)
</code></pre>

<p>It's navigated to HomePage. I set root when logging out:</p>

<pre><code>this.nav.setRoot(LoginPage)
</code></pre>

<p>The problem is when I logged out the tab panel still appeared and all the page seemed to still can be navigated to.</p>

<p>How can I destruct all page when I log out and hide the tabs panel too?</p>