Pen Settings



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


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


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.


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 ng-app="app">
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>Tab Hiding Example</title>

    <link href="" rel="stylesheet">
    <script src=""></script>
  <body animation="slide-left-right-ios7">
    <ion-nav-bar class="bar-stable nav-title-slide-ios7">
      <ion-nav-back-button class="button-icon icon ion-chevron-left">
    <script id="app.html" type="text/ng-template">
      <ion-tabs class="tabs-icon-top">
          <!-- Home Tab -->
          <ion-tab title="Home" icon="icon ion-home" href="#/app/home">
              <ion-nav-view name="app-home"></ion-nav-view>

          <!-- Search Tab -->
          <ion-tab ng-if="displaySearchTab" title="Search" icon="icon ion-android-search" href="#/app/search">
              <ion-nav-view name="app-search"></ion-nav-view>
    <script id="app-home.html" type="text/ng-template">
      <ion-view title="Tab Hiding">
        <ion-content class="has-header padding">
          <h1>Welcome home</h1>
          <p>The idea is to display the second search tab when a specific condition has been set</p>
          <p>We set <code>displaySearchTab</code> inside the HomeController hoping that the <code>ng-if="displaySearchTab"</code> condition will be called to display the second search tab.</p>
          <p ng-if="displaySearchTab">displaySearchTab has been set in the HomeController</p>
    <script id="app-search.html" type="text/ng-template">
      <ion-view title="Tab Hiding">
        <ion-content class="has-header padding">
          <h1>Welcome to the searching</h1>





                // Setting up states
angular.module('app', ['ionic', 'app.controllers'])

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

        .state('app', {
            url: "/app",
            abstract: true,
            templateUrl: "app.html"

        .state('app.home', {
            url: '/home',
            views: {
                'app-home': {
                    templateUrl: 'app-home.html',
                    controller: 'HomeController'
        .state('', {
            url: '/search',
            views: {
                'app-search': {
                    templateUrl: 'app-search.html',
                    controller: 'SearchController'


angular.module('app.controllers', [])

.controller('HomeController', function($scope) {
    $scope.displaySearchTab = true;

.controller('SearchController', function($scope) {