{"id":2145,"date":"2015-08-27T07:45:17","date_gmt":"2015-08-27T07:45:17","guid":{"rendered":"http:\/\/www.nikola-breznjak.com\/blog\/?p=2145"},"modified":"2015-08-27T07:45:17","modified_gmt":"2015-08-27T07:45:17","slug":"how-to-retain-ionic-sidebar-on-every-page","status":"publish","type":"post","link":"https:\/\/nikola-breznjak.com\/blog\/stack-overflow\/how-to-retain-ionic-sidebar-on-every-page\/","title":{"rendered":"How to retain Ionic sidebar on every page?"},"content":{"rendered":"<p><a href=\"http:\/\/stackoverflow.com\/users\/534755\/nikola\"><img loading=\"lazy\" decoding=\"async\" title=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" src=\"http:\/\/stackoverflow.com\/users\/flair\/534755.png\" rel=\"lightbox[2145]\" alt=\"profile for Nikola at Stack Overflow, Q&amp;A for professional and enthusiast programmers\" width=\"208\" height=\"58\" \/><\/a><br \/>\nI&#8217;m a big fan of <a href=\"http:\/\/stackoverflow.com\/\">Stack Overflow<\/a> and I tend to contribute regularly (am currently in the <a href=\"http:\/\/stackexchange.com\/leagues\/1\/alltime\/stackoverflow\/2008-07-31\/534755?sort=reputationchange#534755\">top 0.X%<\/a>).\u00a0In this category (<a href=\"http:\/\/www.nikola-breznjak.com\/blog\/category\/stack-overflow\/\">stackoverflow<\/a>)\u00a0of posts, I will be posting my top rated questions and answers. This, btw, is allowed as explained in the meta thread <a href=\"http:\/\/meta.stackoverflow.com\/questions\/266971\/can-i-post-so-questions-and-answers-in-a-personal-blog\/266973\">here<\/a>.<\/p>\n<p>As you may know, I&#8217;m really into Ionic framework lately\u00a0and am helping out on StackOverflow with the knowledge I gained so far with the framework. I&#8217;m currently #5 All time answerer.<\/p>\n<p>I answered\u00a0<a href=\"http:\/\/stackoverflow.com\/questions\/32063346\/how-to-retain-ionic-sidebar-on-every-page\/32064133\">this question<\/a>\u00a0by user <a href=\"http:\/\/stackoverflow.com\/users\/1905962\/qweick\">Qweick<\/a>:<\/p>\n<p>I&#8217;ve been fiddling with ionic, but I&#8217;ve ran into an issue. If I make a new project with a sidebar, upon navigation to a child state sidebar button disappears and is replaced with a back button. How can I retain sidebar button on every state.\/page?<\/p>\n<p>My <a href=\"http:\/\/stackoverflow.com\/questions\/32063346\/how-to-retain-ionic-sidebar-on-every-page\/32064133#32064133\">answer<\/a> was:<\/p>\n<blockquote><p>On every state\/page you should add the following <code>&lt;ion-nav-buttons&gt;<\/code>, just inside the <code>&lt;ion-view&gt;<\/code>and before the <code>&lt;ion-content&gt;<\/code>:<\/p>\n<pre class=\"lang:default decode:true\">&lt;ion-nav-buttons side=\"left\"&gt;\r\n    &lt;button class=\"button button-icon button-clear ion-navicon\" menu-toggle=\"left\"&gt;&lt;\/button&gt;\r\n&lt;\/ion-nav-buttons&gt;<\/pre>\n<p>So, a full simple example would look something like this:<\/p>\n<pre class=\"lang:default decode:true\">&lt;ion-view view-title=\"Some title\"&gt;\r\n    &lt;ion-nav-buttons side=\"left\"&gt;\r\n        &lt;button class=\"button button-icon button-clear ion-navicon\" menu-toggle=\"left\"&gt;&lt;\/button&gt;\r\n    &lt;\/ion-nav-buttons&gt;\r\n\r\n    &lt;ion-content&gt;\r\n        Some content\r\n    &lt;\/ion-content&gt;\r\n&lt;\/ion-view&gt;<\/pre>\n<p>This would add the &#8220;hamburger&#8221; icon to your navigation, along with the back button.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m a big fan of Stack Overflow and I tend to contribute regularly (am currently in the top 0.X%).\u00a0In this category (stackoverflow)\u00a0of posts, I will be posting my&hellip;<\/p>\n","protected":false},"author":1,"featured_media":1991,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,35],"tags":[],"class_list":["post-2145","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ionic","category-stack-overflow"],"_links":{"self":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/comments?post=2145"}],"version-history":[{"count":1,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2145\/revisions"}],"predecessor-version":[{"id":2146,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/posts\/2145\/revisions\/2146"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media\/1991"}],"wp:attachment":[{"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/media?parent=2145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/categories?post=2145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nikola-breznjak.com\/blog\/wp-json\/wp\/v2\/tags?post=2145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}