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="ionicApp">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    
    <title>Side Menus</title>

    <link href="https://code.ionicframework.com/1.0.0-beta.6/css/ionic.css" rel="stylesheet">
    <script src="https://code.ionicframework.com/1.0.0-beta.6/js/ionic.bundle.js"></script>
  </head>
 
  <body>
    
    <div ng-controller="AppController">       
      <ion-nav-view></ion-nav-view>
    </div>
    
    <script id="app.html" type="text/ng-template">
      <ion-side-menus>
        
        <ion-side-menu-content>
          <ion-nav-bar class="bar-dark">
            <ion-nav-back-button class="button-icon ion-arrow-left-c">
            </ion-nav-back-button>
          </ion-nav-bar>
          <ion-nav-buttons side="left">
            <button class="button button-icon button-clear ion-navicon" ng-click="toggleLeft()">
            </button>
          </ion-nav-buttons>
          <ion-nav-view name="appContent"></ion-nav-view>
        </ion-side-menu-content> 
        
        <ion-side-menu side="left">
          <ion-header-bar class="bar-assertive">
            <h1 class="title">Left Menu</h1>
          </ion-header-bar>
          <ion-content>
            <ion-cart ng-controller='CartController'></ion-cart>
          </ion-content>
        </ion-side-menu>
      </ion-side-menus>
    </script>
    
    <script id="home.html" type="text/ng-template">
      <ion-view title="Ionic Modal">
        <ion-content padding="true">
          <ion-purchase></ion-purchase>
          <button class="button" ng-click="newcase()">Open Modal</button>
        </ion-content>
      </ion-view>
    </script>
    
    <script id="gbCaseEdit.html" type="text/ng-template">
      <div class="modal" style="width: 100%; height: 100%; left:1px;top:1px">
  <ion-header-bar class="bar bar-header bar-calm">
    <h1 class="title">Modal</h1>
  </ion-header-bar>
  <ion-content>
    <div class="list list-inset has-header">
      <label class="item item-input">
        <input type="text" placeholder="1">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="2">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="3">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="4">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="5">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="6">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="7">
      </label>
      <label class="item item-input">
        <input type="text" placeholder="8">
      </label>
    </div>        
    <div style="clear:both; height:300px"></div>
  </ion-content>  
    <div class="float-button">
      <span class="height-fix">
        <a ui-sref="add-trip" class="content" ng-click="closeLogin()">
          <i class="ion-checkmark-circled"> </i>
        </a>
      </span>
    </div>
    <div class="float-button-l">
      <span class="height-fix">
        <a ui-sref="add-trip" class="content" ng-click="closeLogin()">
          <i class="ion-close-circled"> </i>
        </a>
      </span>
    </div>
</div>
    </script>  
  </body>
</html>
              
            
!

CSS

              
                /* For floating button */
.float-button {
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    width: 30px;
    padding: 30px;
    font-size: 60px;
    background: $warning;
    position: fixed;
    bottom: 0px; /* Adjust to where you want it */
    right: 50px; /* Adjust to where you want it */
    z-index: 9999;
    text-shadow: 0px 2px 4px gray; 
    color:#039BE5;
}
.float-button-l {
    -webkit-border-radius: 50%;
    -moz-border-radius: 50%;
    border-radius: 50%;
    width: 30px;
    padding: 30px;
    font-size: 60px;
    background: $warning;
    position: fixed;
    bottom: 0px; /* Adjust to where you want it */
    left: 0px; /* Adjust to where you want it */
    z-index: 9999;
    text-shadow: 0px 2px 4px gray; 
    color:#F4511E;
}

.float-button .float-button-l .float-button-r .height_fix {
    margin-top: 100%;
}

.float-button .float-button-l .content {
    position: absolute;
    left: 0;
    top: 50%;
    height: 100%;
    width: 100%;
    text-align: center;
    margin-top: -30px; /* Note, this must be half the font size */
    color: $light;
}
.float-button-r {
    position: absolute;
    left: 0;
    top: 50%;
    height: 100%;
    width: 100%;
    text-align: center;
    margin-top: -30px; /* Note, this must be half the font size */
    color: $light;
}

ion-content > .scroll ,
ion-content > .scroll > .slider{
    height: 100%;
}
              
            
!

JS

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

.config(function($stateProvider, $urlRouterProvider) {

  $stateProvider
    .state('app', {
      url: "/app",
      abstract: true,
      templateUrl: "app.html",
      controller : "CaseController"
    })
    .state('app.home', {
      url: "/home",
      views: {
        'appContent' :{
          templateUrl: "home.html",
          controller : "HomeController"
        }
      }
    })
  
  $urlRouterProvider.otherwise("/app/home");
})

.controller('AppController', function($scope, $ionicSideMenuDelegate) {
  $scope.toggleLeft = function() {
    $ionicSideMenuDelegate.toggleLeft();
  };
})

.controller("HomeController", function($scope) {
  
})

.controller("CartController", function($scope) {
  
  $scope.data = {
    items : []
  };
  
  for(var i = 0; i < 25; i++) {
    $scope.data.items.push({
      id : i,
      label : "Item " + i
    })
  }
  
})

.controller('CaseController', function($scope, $ionicModal, $timeout, $ionicPopup) {
  // Form data for the login modal
  $scope.loginData = {};

  // Create the login modal that we will use later
  $ionicModal.fromTemplateUrl('gbCaseEdit.html', {
    scope: $scope
  }).then(function(modal) {
    $scope.modal = modal;
  });

  // Triggered in the login modal to close it
  $scope.closeLogin = function() {
    $scope.modal.hide();
  };

  // Open the login modal
  $scope.newcase = function() {
    $scope.modal.show();
  };

  // Perform the login action when the user submits the login form
  $scope.doLogin = function() {
    console.log('Doing login', $scope.loginData);

    // Simulate a login delay. Remove this and replace with your login
    // code if using a login system
    $timeout(function() {
      $scope.closeLogin();
    }, 10);
  };


 })


              
            
!
999px

Console