Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <html ng-app="demo">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

    <title>Ionic SideMenu + Tabs</title>

    <link href="https://code.ionicframework.com/1.3.1/css/ionic.min.css" rel="stylesheet">
    <script src="https://code.ionicframework.com/1.3.1/js/ionic.bundle.min.js"></script>
</head>
<body>

<!-- ALL VIEW STATES LOADED IN HERE -->
<ion-nav-view></ion-nav-view>
  
<script id="menu-abstract.html" type="text/ng-template">
   <ion-side-menus>
   
     <ion-side-menu-content ng-controller="MenuController">
      <ion-nav-bar class="bar-energized">
        <ion-nav-back-button class="button-clear"><i class="icon ion-ios-arrow-back"></i></ion-nav-back-button>
      </ion-nav-bar>
     
      <ion-nav-view name="view-content"></ion-nav-view>
    </ion-side-menu-content>
    
    <ion-side-menu side="left" ng-controller="MenuController">
      <ion-header-bar class="bar bar-header bar-assertive">
        <h1 class="title">Menu</h1>
      </ion-header-bar>
      <ion-content has-header="true">
        <ul class="list">
          <a ui-sref="menu.home" nav-clear class="item" ng-click="toggleLeft()">Home</a>
          <a ui-sref="menu.tab-1" nav-clear class="item" ng-click="toggleLeft()">Chat</a>
          <a ui-sref="menu.drink" nav-clear class="item" ng-click="toggleLeft()">Drink</a>
        </ul>
      </ion-content>
    </ion-side-menu>
    
  </ion-side-menus>
</script>
  
<script id="home.html" type="text/ng-template">
  <ion-view title="Home Page" hide-back-button="true">
      <ion-nav-buttons side="left">
        <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
      </ion-nav-buttons>

      <ion-content has-header="true" padding="true">
        <h3>Home Content</h3>
      </ion-content>
    </ion-view>
  </script>

 <script id="drink.html" type="text/ng-template">
    <ion-view title="Drink list" hide-back-button="true">
      <ion-nav-buttons side="left">
        <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
      </ion-nav-buttons>
      
      <ion-content has-header="true" padding="true">
        <h3>Drink list</h3>
        <div class="list">
            <a class="item item-avatar" href="">
              <img src="http://lh6.ggpht.com/FftLqhhGQXPTySOyXdZBtMPh81Sgu_bsKthhzMu-U_7UJ8-Zbzk3mrbsa0th-Vv28LNWvZMBt-_B5i89q_HEzhM=s230-c" />
              <h2>Ultimate Bloody Mary</h2>
              <p>Tomato juice, habanero, aquavit and Lea & Perrins Worcestershire Sauce</p>
            </a>
            <a class="item item-avatar" href="">
              <img src="http://lh5.ggpht.com/QR4CdPeEJjRZWlr7QjFUmuSfbMFezyWPv5udJQoqIKrHhdDYCXzHKx2Rwn9cq-1TbpEFoSUHtn_TUnDO0KnvkA=s230-c" />
              <h2>Bloody Scary</h2>
              <p>Blood orange juice, campari, prosecco, vodka and simple syrup</p>
            </a>
            <a class="item item-avatar" href="">
              <img src="http://lh5.ggpht.com/hHUPkpVrUoxEVnDlXuS1h2yOgGKuvi2Td9Gr8lrFgxWdB_ExbgLvZ8AOKKoX2luv_-GIkuH72UA9nYx9IiRHAA=s230-c" />
              <h2>Wasabi Bloody Marys</h2>
              <p>Ice, tomato juice, vodka, wasabi powder, soy sauce, lemon juice and more</p>
            </a>
        </div>
      </ion-content>
    </ion-view>
</script>
  
<script id="chat-single.html" type="text/ng-template">
    <ion-view title="Oliver Thredson">
      <ion-content has-header="true" padding="true">
        <div class="list card">
          <div class="item item-avatar">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Zachary_Quinto_2011.jpg/200px-Zachary_Quinto_2011.jpg">
            <h2>Oliver Thredson</h2>
            <p>I'm a psychiatrist at Briarcliff Institute</p>
          </div>
          
          <div class="item item-body">
            <p>
              Unlike most of the staff at Briarcliff, Dr Thredson was stoically calm and clinical around patients at the beginning of the series. He also had a less barbaric outlook towards treatment, saying that more compassion would greatly improve conditions for the patients. He was willing to look at the patients as more than just insane criminals in comparison to the sadistic treatment of Sister Jude. However, in his alter ego as "Bloody Face", he reverted to his darker side - an unhinged, sadistic murderer with deep-seated maternal abandonment issues.
            </p>
            <p>
              <a href="#" class="subdued">1 Like</a>
            </p>
          </div>

          <div class="item tabs tabs-secondary tabs-icon-left">
            <a class="tab-item" href="#">
              <i class="icon ion-thumbsup"></i>
              Like
            </a>
            <a class="tab-item" href="#">
              <i class="icon ion-chatbubbles"></i>
              Chat
            </a>
          </div>

        </div>
      </ion-content>

    </ion-view>
</script>
  
<script id="tab-1.html" type="text/ng-template">
  <ion-view title="Chat list" hide-back-button="true">

    <ion-nav-buttons side="left">
      <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
    </ion-nav-buttons>

    <ion-content has-header="true" padding="true">

      <h3>Chat list</h3>
      <div class="list">

          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Zachary_Quinto_2011.jpg/200px-Zachary_Quinto_2011.jpg" />
            <h2>Oliver Thredson</h2>
            <p>I'm a psychiatrist at Briarcliff Institute</p>
          </a>
          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Sarah_Paulson_12_Years_a_Slave_55_cropped.jpg/129px-Sarah_Paulson_12_Years_a_Slave_55_cropped.jpg" />
            <h2>Lana Winters</h2>
            <p>I'm an ambitious journalist committed to the asylum</p>
          </a>
          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Evan_Peters_by_Gage_Skidmore.jpg/165px-Evan_Peters_by_Gage_Skidmore.jpg" />
            <h2>Kit Walker</h2>
            <p>I'm an inmate at Briarcliff Institute</p>
          </a>

      </div>
    </ion-content>

    <ion-tabs class="tabs-icon-top tabs-striped">
      <ion-tab title="Home" icon-on="ion-ios-filing" icon-off="ion-ios-filing-outline" ui-sref="menu.tab-1">
      </ion-tab>

      <ion-tab title="Chat" icon-on="ion-ios-chatbubble" icon-off="ion-ios-chatbubble-outline" ui-sref="menu.tab-2">
      </ion-tab>

      <ion-tab title="Drink" icon-on="ion-ios-wineglass" icon-off="ion-ios-wineglass-outline" ui-sref="menu.tab-3">
      </ion-tab>
    </ion-tabs>
    
  </ion-view>
</script>
  
<script id="tab-2.html" type="text/ng-template">
  <ion-view title="Chat list two" hide-back-button="true">

    <ion-nav-buttons side="left">
      <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
    </ion-nav-buttons>

    <ion-content has-header="true" padding="true">

      <h3>Chat list two</h3>
      <div class="list">

          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Zachary_Quinto_2011.jpg/200px-Zachary_Quinto_2011.jpg" />
            <h2>Oliver Thredson</h2>
            <p>I'm a psychiatrist at Briarcliff Institute</p>
          </a>
          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Sarah_Paulson_12_Years_a_Slave_55_cropped.jpg/129px-Sarah_Paulson_12_Years_a_Slave_55_cropped.jpg" />
            <h2>Lana Winters</h2>
            <p>I'm an ambitious journalist committed to the asylum</p>
          </a>
          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Evan_Peters_by_Gage_Skidmore.jpg/165px-Evan_Peters_by_Gage_Skidmore.jpg" />
            <h2>Kit Walker</h2>
            <p>I'm an inmate at Briarcliff Institute</p>
          </a>

      </div>
    </ion-content>

    <ion-tabs class="tabs-icon-top tabs-striped">
      <ion-tab title="Home" icon-on="ion-ios-filing" icon-off="ion-ios-filing-outline" ui-sref="menu.tab-1">
      </ion-tab>

      <ion-tab title="Chat" icon-on="ion-ios-chatbubble" icon-off="ion-ios-chatbubble-outline" ui-sref="menu.tab-2">
      </ion-tab>

      <ion-tab title="Drink" icon-on="ion-ios-wineglass" icon-off="ion-ios-wineglass-outline" ui-sref="menu.tab-3">
      </ion-tab>
    </ion-tabs>
  </ion-view>
</script>
  
<script id="tab-3.html" type="text/ng-template">
  <ion-view title="Chat list three" hide-back-button="true">

    <ion-nav-buttons side="left">
      <button menu-toggle="left" class="button button-icon icon ion-navicon"></button>
    </ion-nav-buttons>

    <ion-content has-header="true" padding="true">

      <h3>Chat list three</h3>
      <div class="list">

          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Zachary_Quinto_2011.jpg/200px-Zachary_Quinto_2011.jpg" />
            <h2>Oliver Thredson</h2>
            <p>I'm a psychiatrist at Briarcliff Institute</p>
          </a>
          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/Sarah_Paulson_12_Years_a_Slave_55_cropped.jpg/129px-Sarah_Paulson_12_Years_a_Slave_55_cropped.jpg" />
            <h2>Lana Winters</h2>
            <p>I'm an ambitious journalist committed to the asylum</p>
          </a>
          <a class="item item-avatar" href="#/menu/chat-single">
            <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/15/Evan_Peters_by_Gage_Skidmore.jpg/165px-Evan_Peters_by_Gage_Skidmore.jpg" />
            <h2>Kit Walker</h2>
            <p>I'm an inmate at Briarcliff Institute</p>
          </a>

      </div>
    </ion-content>

    <ion-tabs class="tabs-icon-top tabs-striped">
      <ion-tab title="Home" icon-on="ion-ios-filing" icon-off="ion-ios-filing-outline" ui-sref="menu.tab-1">
      </ion-tab>

      <ion-tab title="Chat" icon-on="ion-ios-chatbubble" icon-off="ion-ios-chatbubble-outline" ui-sref="menu.tab-2">
      </ion-tab>

      <ion-tab title="Drink" icon-on="ion-ios-wineglass" icon-off="ion-ios-wineglass-outline" ui-sref="menu.tab-3">
      </ion-tab>
    </ion-tabs>
  </ion-view>
</script>


</body>
</html>

              
            
!

CSS

              
                .pull-right{
  float: right;
}
.button-halfwidth{
  width: 49%;
}
.button-fullwidth{
  width: 100%;
}
              
            
!

JS

              
                angular.module('demo', ['ionic'])

    .config(['$stateProvider', '$urlRouterProvider', '$ionicConfigProvider', function($stateProvider, $urlRouterProvider, $ionicConfigProvider) {
   
       $ionicConfigProvider.backButton.text('').previousTitleText(false);
       $ionicConfigProvider.views.transition('none');

        $stateProvider
            .state('menu', {
                url : '/menu',
                templateUrl : 'menu-abstract.html',
                abstract : true,
                controller : 'MenuController'
            })
            .state('menu.home', {
                url: '/home',
                views: {
                    'view-content': {
                        templateUrl: 'home.html',
                        controller : 'HomeController'
                    }
                }
            })
            .state('menu.drink', {
                url: '/drink',
                views: {
                    'view-content': {
                        templateUrl: 'drink.html',
                        controller : 'DrinkController'
                    }
                }
            })
            .state('menu.chat-single', {
                url: '/chat-single',
                views: {
                    'view-content': {
                        templateUrl: 'chat-single.html',
                        controller : 'ChatSingleController'
                  }
                }
            })
            .state('menu.tab-1', {
                url: '/tab-1',
                views: {
                    'view-content': {
                        templateUrl: 'tab-1.html',
                        controller : 'TabOneController'
                    }
                }
            })
            .state('menu.tab-2', {
                url: '/tab-2',
                views: {
                    'view-content': {
                        templateUrl: 'tab-2.html',
                        controller : 'TabTwoController'
                    }
                }
            })
            .state('menu.tab-3', {
                url: '/tab-3',
                views: {
                    'view-content': {
                        templateUrl: 'tab-3.html',
                        controller : 'TabThreeController'
                    }
                }
            })

        $urlRouterProvider.otherwise('/menu/home');
    }])

    .controller('MenuController', function($scope, $ionicSideMenuDelegate) {
      $scope.toggleLeft = function() {
        $ionicSideMenuDelegate.toggleLeft();
      };
    })
    .controller('Controller', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('HomeController', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('ChatController', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('ChatSingleController', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('DrinkController', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('TabOneController', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('TabTwoController', function($scope, $ionicSideMenuDelegate) {
    })
    .controller('TabThreeController', function($scope, $ionicSideMenuDelegate) {
    })


              
            
!
999px

Console