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="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
  </head>

  <body>

    <ion-nav-view></ion-nav-view>

    <script id="templates/menu.html" type="text/ng-template">
      <ion-side-menus enable-menu-with-back-views="false">

        <ion-side-menu-content>
          <ion-nav-bar class="bar-positive">
            <ion-nav-back-button>
            </ion-nav-back-button>

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

          <ion-nav-view name="menuContent"></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>
            <ul class="list">
              <!-- Note each link has the 'menu-close' attribute so the menu auto closes when clicking on one of these links -->
              <a ui-sref="app.home" class="item" menu-close>Home</a>
            </ul>
          </ion-content>
        </ion-side-menu>

      </ion-side-menus>
    </script>

    <script id="templates/home.html" type="text/ng-template">
      <ion-view view-title="Home">
        
        <ion-tabs class="tabs-background-positive tabs-color-light">
          <ion-tab title="Keyword Search">
            <ion-content class="padding">
              <p style="margin-top: 50px;">Keyword Search Form goes here...</p>
              <button class="button" ui-sref="app.results.index">Search</button>
            </ion-content>
          </ion-tab>

          <ion-tab title="Image Search">
            <ion-content class="padding">
              <p style="margin-top: 50px;">Image Search Form goes here...</p>
              <button class="button" ui-sref="app.results.index">Search</button>
            </ion-content>
          </ion-tab>
        </ion-tabs>
      </ion-view>
    </script>
    
    <script id="templates/results.html" type="text/ng-template">
      <ion-view view-title="Results">
        
        <ion-tabs class="tabs-background-positive tabs-color-light">
          <ion-tab title="Results" ui-sref="app.results.index">
            <ion-nav-view name="index"></ion-nav-view>
          </ion-tab>

          <ion-tab title="Filters" ui-sref="app.results.filters">
            <ion-nav-view name="filters"></ion-nav-view>
          </ion-tab>
        </ion-tabs>
        
      </ion-view>
    </script>

    <script id="templates/results-index.html" type="text/ng-template">
      <ion-view view-title="Results">
        <ion-nav-buttons side="right">
          <button class="button button-clear" ui-sref="app.cart.index">Cart</button>
        </ion-nav-buttons>
        
        <ion-content>
          <ion-list>
            <ion-item ui-sref="app.results.details">Product 1</ion-item>
            <ion-item ui-sref="app.results.details">Product 2</ion-item>
            <ion-item ui-sref="app.results.details">Product 3</ion-item>
          </ion-list>
        </ion-content>
      </ion-view>
    </script>
    
    <script id="templates/results-filters.html" type="text/ng-template">
      <ion-view view-title="Results">
        <ion-content>
          <p>Filters go here...</p>
        </ion-content>
      </ion-view>
    </script>
    
    <script id="templates/results-details.html" type="text/ng-template">
      <ion-view view-title="Product Details">
        <ion-content>
          <p>Product details...</p>
        </ion-content>
      </ion-view>
    </script>
    
    <script id="templates/cart.html" type="text/ng-template">
      <ion-view view-title="Shopping Cart">
        
        <ion-tabs class="tabs-background-positive tabs-color-light">
          <ion-tab title="Cart" ui-sref="app.cart.index">
            <ion-nav-view name="cart"></ion-nav-view>
          </ion-tab>

          <ion-tab title="Saved Items" ui-sref="app.cart.saved">
            <ion-nav-view name="saved"></ion-nav-view>
          </ion-tab>
        </ion-tabs>
        
      </ion-view>
    </script>
    
    <script id="templates/cart-index.html" type="text/ng-template">
      <ion-view>
        <ion-content>
          <p>Cart Items...</p>
        </ion-content>
      </ion-view>
    </script>
    
    <script id="templates/cart-saved.html" type="text/ng-template">
      <ion-view>
        <ion-content>
          <p>Saved Items...</p>
        </ion-content>
      </ion-view>
    </script>

  </body>
</html>
              
            
!

CSS

              
                body {
  cursor: url('https://ionicframework.com/img/finger.png'), auto;
}
              
            
!

JS

              
                //console.clear();

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

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

  $stateProvider
    .state('app', {
      url: "",
      abstract: true,
      templateUrl: "templates/menu.html"
    })
  
    .state('app.home', {
      url: "/home",
      views: {
        menuContent :{
          templateUrl: "templates/home.html"
        }
      }
    })
  
    .state('app.results', {
      url: '/results',
      abstract: true,
      views: {
        menuContent: {
          templateUrl: 'templates/results.html'
        }
      }
    })

    .state('app.results.index', {
      url: '',
      views: {
        index: {
          templateUrl: 'templates/results-index.html'
        }
      }
    })
  
  .state('app.results.details', {
      url: '/details',
      views: {
        index: {
          templateUrl: 'templates/results-details.html'
        }
      }
    })

    .state('app.results.filters', {
      url: '/filters',
      views: {
        filters: {
          templateUrl: 'templates/results-filters.html'
        }
      }
    })
  
  .state('app.cart', {
      url: '/cart',
      abstract: true,
      views: {
        menuContent: {
          templateUrl: 'templates/cart.html'
        }
      }
    })

    .state('app.cart.index', {
      url: '',
      views: {
        cart: {
          templateUrl: 'templates/cart-index.html'
        }
      }
    })
  
    .state('app.cart.saved', {
      url: '/saved',
      views: {
        saved: {
          templateUrl: 'templates/cart-saved.html'
        }
      }
    })
  
  $urlRouterProvider.otherwise("home");
})
              
            
!
999px

Console