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.

Details

Privacy

Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO

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.

Template

Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:

Screenshot

Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO

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>Tabs Example</title>

     <link href="//code.ionicframework.com/1.0.0-beta.13/css/ionic.min.css" rel="stylesheet">
    <script src="//code.ionicframework.com/1.0.0-beta.13/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="right">
            <a href="#/home" class="button button-icon nav-clear ion-home"></a>
            <a href="#/upload" class="button button-icon nav-clear ion-upload"></a>
            <a href="#/settings" class="button button-icon nav-clear ion-navicon-round"></a>
        </ion-nav-buttons>

            <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-stable">
            <h1 class="title">Right</h1>
          </ion-header-bar>
          <ion-content>
            <ion-list>
              <ion-item nav-clear menu-close ui-sref="app.welcome">
                Welcome
              </ion-item>
              <ion-item nav-clear menu-close ui-sref="app.login">
                Login
              </ion-item>
              <ion-item nav-clear menu-close ui-sref="app.tabs1.home1">
                Tabs
              </ion-item>
              <ion-item nav-clear menu-close ui-sref="app.tabs2.home2">
                Tabs 2
              </ion-item>
            </ion-list>
          </ion-content>
        </ion-side-menu>
      </ion-side-menus>

    </script>

    <script id="templates/tabs1.html" type="text/ng-template">
      <ion-tabs class="tabs-positive tabs-icon-top">

        <ion-tab title="Home1" icon-on="ion-ios7-filing" ui-sref="app.tabs1.home1" icon-off="ion-ios7-filing-outline">
          <ion-nav-view name="home1"></ion-nav-view>
        </ion-tab>

        <ion-tab title="About1" icon-on="ion-ios7-clock" ui-sref="app.tabs1.about1" icon-off="ion-ios7-clock-outline">
          <ion-nav-view name="about1"></ion-nav-view>
        </ion-tab>

        <ion-tab title="Settings1" icon-on="ion-ios7-gear" ui-sref="app.tabs1.settings1" icon-off="ion-ios7-gear-outline">
          <ion-nav-view name="settings1"></ion-nav-view>
        </ion-tab>

      </ion-tabs>
    </script>

    <script id="templates/tabs2.html" type="text/ng-template">
      <ion-tabs class="tabs-positive tabs-icon-top">

        <ion-tab title="Home2" icon-on="ion-ios7-filing" ui-sref="app.tabs2.home2" icon-off="ion-ios7-filing-outline">
          <ion-nav-view name="home2"></ion-nav-view>
        </ion-tab>

        <ion-tab title="About2" icon-on="ion-ios7-clock" ui-sref="app.tabs2.about2" icon-off="ion-ios7-clock-outline">
          <ion-nav-view name="about2"></ion-nav-view>
        </ion-tab>

        <ion-tab title="Settings2" icon-on="ion-ios7-gear" ui-sref="app.tabs2.settings2" icon-off="ion-ios7-gear-outline">
          <ion-nav-view name="settings2"></ion-nav-view>
        </ion-tab>

      </ion-tabs>
    </script>

    <script id="templates/welcome.html" type="text/ng-template">
      <ion-view view-title="Welcome">
       
          
            <div class="row"  style="background-color: black">
    <div class="col s12">
      <ul class="tabs" style="top: 43px;">
        <li class="tab col s3"><a class="wm-tab waves-effect meeter-tab-waves-blue waves-ripple" href="">Test 1</a></li>
        <li class="tab col s3"><a class="wm-tab waves-effect meeter-tab-waves-blue waves-ripple"  href="">Test 2</a></li>
        <li class="tab col s3"><a class="wm-tab waves-effect meeter-tab-waves-blue waves-ripple" href="">Test 3</a></li>
      </ul>
    </div>
</div>
    <div  class="col s12">
      
       <ion-content style="margin-left:50px">
      
       <h1>Welcome Page</h1>
          
                      
          
          <div class="item item-divider">Default Account</div>
            
            <ion-radio ng-model="activeAcc.value" 
                       ng-repeat="calendarSource in activeAccounts" 
                       ng-value="calendarSource.email" 
                       ng-click="onAccountChange(calendarSource, $event)"
                       name="callendar__">{{calendarSource.email}} | v: {{calendarSource.is_verified}} | is_d: {{calendarSource.is_default}}
            </ion-radio>
          </div>
        
        <pre>{{activeAccounts|json}}</pre>
        
       
        
      
    </div>
    <div  class="col s12">Test 2</div>
    <div class="col s12">Test 3</div>
          
        </ion-content>
      </ion-view>
    </script>

    <script id="templates/login.html" type="text/ng-template">
      <ion-view view-title="Login">
        <ion-content >
          
          <h1>Login Page</h1>
          
          <wm-panel title="{{data.value}}" wm-icon="ion-help-circled" wm-icon-action="foo()">
            <a class="item  item-icon-right" href="" 
                       style="position:relative;padding: 10px;height:62px;"
                      >

                        <div style="position:absolute; line-height: 35px;">
                           some text
                        </div>  

                        <div style="width:70%;position:absolute;line-height: 42px;margin-left: 60px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
                            <span ng-bind='profile.name'></span>
                        </div>

                        <i class="icon ion-ios-arrow-right settings-wm-ion-icon-arrow-right"></i>
                    </a>
          </wm-panel>
          
           <wm-panel >
          other panel
          </wm-panel>
          
            <div class="card-panel teal lighten-2">This is a card panel with a teal lighten-2 class</div>

TEXT COLOR
  <div class="card-panel">
      <span class="blue-text text-darken-2">This is a card panel with dark blue text</span>
 </div>
          <a class="waves-effect waves-light btn">Stuff</a>
<a class="waves-effect waves-light btn"><i class="mdi-file-cloud left"></i>button</a>
<a class="waves-effect waves-light btn"><i class="mdi-file-cloud right"></i>button</a>
          
          <a class="wm-btn-floating btn-floating btn-large waves-effect waves-light red" style="margin: 50px;"><i class="mdi-content-add"></i></a>
          
   
 <div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
    <a class="wm-btn-floating  btn-floating btn-large waves-effect waves-light red" style="z-index: 2002;">
      <i class="large mdi-editor-mode-edit"></i>
    </a>
    <ul>
      <li><a class="btn-floating red"><i class="large mdi-editor-insert-chart"></i></a></li>
      <li><a class="btn-floating yellow darken-1"><i class="large mdi-editor-format-quote"></i></a></li>
      <li><a class="btn-floating green"><i class="large mdi-editor-publish"></i></a></li>
      <li><a class="btn-floating blue"><i class="large mdi-editor-attach-file"></i></a></li>
    </ul>
  </div>
 </ion-content>
          </div>
       
      </ion-view>
    </script>

    <script id="templates/tabs1-home1.html" type="text/ng-template">
      <ion-view view-title="Home1">
        <ion-content>
          <h1>Home1 Tab</h1>
         <h3>switch</h3>
          
          <div class="switch">
       <label>
        Off
        <input type="checkbox" ng-model="data.switcher">
        <span class="lever"></span>
        On
    </label>
  </div>
           </br>
         </br>
          
          <li class="item  item-icon-left switch" >
                    <i class="icon settings-wm-ion-icon ion-android-share"></i>
                    Share availability
                   
                    <label style="position: absolute;right: 12px;z-index: 3;">
                        {{(data.switcher) ? 'On': 'Off'}}
                        <input type="checkbox" ng-model="data.switcher">
                        <span class="lever"></span>
                       
                    </label>
                

                </li>
          
          
          </br>
         
        
        </br>
      <h3>checkboxes</h3>
  
      <p  class="meeter-checkbox">
    <input  type="checkbox" id="{{some.email}}"  ng-model="some.is_default"/>
    <label style='font-size: 1.2rem;color: #606060;' for="{{some.email}}">{{some.email}}</label>
  </p> 
      
  <p class="wm-checkbox-disabled"  ng-repeat=" ch in data.checkboxes" class="meeter-checkbox" >
    <input  type="checkbox" id="{{ch.name}}"  ng-model="ch.value"  />
    <label  style='font-size: 1.2rem;color: #606060;' for="{{ch.name}}">{{ch.name}}</label>
  </p>
  
  <p ng-repeat=" ch in data.checkboxes" >
    <input type="checkbox" id="{{ch.name}}"  ng-model="ch.value"/>
    <label style='font-size: 1.2rem;color: #606060;' for="{{ch.name}}">{{ch.name}}</label>
  </p>
      
      </br>

 <a class="btn-floating btn-large waves-effect waves-light black" style="margin: 50px;width:30px;height:30px;line-height: 30px;">
   <i class="ion-help-circled" style="line-height: 30px;width: 30px;height: 30px;font-size: 30px;">
    </i></a>
    
    </br>
  
  <p ng-repeat=" rd in data.radios">
    <input type="radio"  name="radios" id="{{rd.name}}" value="{{rd.name}}"  
           ng-model="data.radioSelected"
           ng-click=onMeeterProfileEmailChange(rd.name)>
    <label  for="{{rd.name}}">{{rd.name}}</label>
   
  </p>
      
      </br>
          <pre>data.radioSelected: {{data.radios|json}}</pre>
      
 <!-- <p>
    <input type="checkbox" id="test6" checked="checked" />
    <label for="test6">Yellow</label>
  </p>
  <p>
    <input type="checkbox" id="test7" checked="data.checkbox.green.value"  />
    <label for="test7">Green</label>
  </p>
    <p>
      <input type="checkbox" id="test8" disabled="disabled" />
      <label for="test8">Brown</label>
  </p>
-->
      
        
        </ion-content>
      </ion-view>
    </script>

    <script id="templates/tabs1-about1.html" type="text/ng-template">
      <ion-view view-title="About1">
        <ion-content>
          <h1>About1 Tab</h1>
          
           <a href="" class="btn" onclick="Materialize.showStaggeredList('#staggered-test')">Click Me</a>
          
           <ul id="staggered-test" style="opacity: 0;">
          <li ng-repeat="a in [1,2,3,4,5,6,7,8,9]" class="">
            <h4><a href="#">List Item</a></h4>
            <p>This is a description {{a}}</p>
          </li>
        </ul>
          
          
        </ion-content>
      </ion-view>
    </script>

    <script id="templates/tabs1-settings1.html" type="text/ng-template">
      <ion-view view-title="Settings1">
        <ion-content>
          <h1>Settings1 Tab</h1>
        </ion-content>
      </ion-view>
    </script>

    <script id="templates/tabs2-home2.html" type="text/ng-template">
      <ion-view view-title="Home2">
        <ion-content>
          <h1>Home2 Tab</h1>
        </ion-content>
      </ion-view>
    </script>

    <script id="templates/tabs2-about2.html" type="text/ng-template">
      <ion-view view-title="About2">
        <ion-content>
          <h1>About2 Tab</h1>
        </ion-content>
      </ion-view>
    </script>

    <script id="templates/tabs2-settings2.html" type="text/ng-template">
      <ion-view view-title="Settings2">
        <ion-content>
          <h1>Settings2 Tab</h1>
        </ion-content>
      </ion-view>
    </script>

  </body>
</html>
              
            
!

CSS

              
                .bar-subheader.has-tabs-top{
  top:93px !important;
}

.has-subheader.has-tabs-top{
  top:137px;
}

 .meeter-checkbox input[type="checkbox"]:not(:checked)  + label:before {
  border: 2px solid #afafaf; }

/* Checked styles */
 .meeter-checkbox input[type="checkbox"]:checked  + label:before {
    left: -10px;
    width: 17px;
    height: 27px;
    border-right: 4px solid #3398e5;
    border-bottom: 4px solid #3398e5;
}

input[type="text"]{
  border-bottom: 1px solid #9e9e9e;
}

.wm-btn-floating .waves-ripple {
    width: 8px !important;
    height: 8px !important;
}

.waves-effect.meeter-tab-waves-blue .waves-ripple {
    background-color: #fff;
    }

a.wm-tab {
  background-color: #3398e5 !important;
}


.tabs .indicator {
    position: absolute;
    bottom: 0;
    height: 4px;
    background-color: #F9C600;
    will-change: left, right;
  z-index: 1;
  }


.tabs .tab a {
  color: #fff;
  
}


.wm-subheader-color{
    background-color: #fff;
    background: rgb(243, 243, 243);
    height: 4.8%;
    position: relative;
}

.wm-subheader-color p{
  color: black;
  font-family: 'HelveticaNeue';
  font-size: 1rem;
  margin-left: 1.5%;
  position: absolute;
  text-align: left;
  /*width: 100%;
  border-bottom-width: 0px;*/
  /*letter-spacing: -0.2px;*/
  /*margin-top: 4px;*/
  top: 17%;
}


/* disabled checkbox */
.wm-checkbox-disabled [type="checkbox"]:not(:checked) + label:before {
  top: 0;
  left: 0;
  box-shadow: none;
  background-color: rgba(0, 0, 0, 0.26);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.26);
  -webkit-transform: rotateZ(0deg);
  -moz-transform: rotateZ(0deg);
  -ms-transform: rotateZ(0deg);
  -o-transform: rotateZ(0deg);
  transform: rotateZ(0deg); }

.wm-checkbox-disabled [type="checkbox"]:checked + label:before {
  left: -3px;
  top: -4px;
  width: 12px;
  height: 22px;
  border-top: 2px solid transparent;
  border-left: 2px solid transparent;
  border-right: 2px solid rgba(0, 0, 0, 0.26);
  border-bottom: 2px solid rgba(0, 0, 0, 0.26);
  -webkit-transform: rotateZ(40deg);
  -moz-transform: rotateZ(40deg);
  -ms-transform: rotateZ(40deg);
  -o-transform: rotateZ(40deg);
  transform: rotateZ(40deg);
  -webkit-backface-visibility: hidden;
  -webkit-transform-origin: 100% 100%;
  -moz-transform-origin: 100% 100%;
  -ms-transform-origin: 100% 100%;
  -o-transform-origin: 100% 100%;
  transform-origin: 100% 100%; }

.wm-checkbox-disabled [type="checkbox"]:checked + label {
  color: rgba(0, 0, 0, 0.26); }

.wm-checkbox-disabled [type="checkbox"]:not(:checked) + label:hover:before {
  border-color: rgba(0, 0, 0, 0.26); }
              
            
!

JS

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

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

   
 // $ionicConfigProvider.views.transition('android');

  $stateProvider
  .state('app', {
    url: "/app",
    abstract: true,
    templateUrl: "templates/menu.html",
    controller: 'AppCtrl'
  })

  .state('app.welcome', {
    url: "/welcome",
    views: {
      'menuContent': {
        templateUrl: "templates/welcome.html",
        controller: 'WelcomeCtrl'
      }
    }
  })

  .state('app.login', {
    url: "/login",
    views: {
      'menuContent': {
        templateUrl: "templates/login.html",
        controller: 'LoginCtrl'
      }
    }
  })

  .state('app.tabs1', {
    url: "/tabs1",
    abstract: true,
    views: {
      'menuContent': {
        templateUrl: "templates/tabs1.html",
        controller: 'WelcomeCtrl'
      }
    }
  })

  .state('app.tabs1.home1', {
    url: "/home1",
    views: {
      'home1': {
        templateUrl: "templates/tabs1-home1.html"
      }
    }
  })

  .state('app.tabs1.about1', {
    url: "/about1",
    views: {
      'about1': {
        templateUrl: "templates/tabs1-about1.html"
      }
    }
  })

  .state('app.tabs1.settings1', {
    url: "/settings1",
    views: {
      'settings1': {
        templateUrl: "templates/tabs1-settings1.html"
      }
    }
  })

  .state('app.tabs2', {
    url: "/tabs2",
    abstract:true,
    views: {
      'menuContent': {
        templateUrl: "templates/tabs2.html"
      }
    }
  })

  .state('app.tabs2.home2', {
    url: "/home2",
    views: {
      'home2': {
        templateUrl: "templates/tabs2-home2.html"
      }
    }
  })

  .state('app.tabs2.about2', {
    url: "/about2",
    views: {
      'about2': {
        templateUrl: "templates/tabs2-about2.html"
      }
    }
  })

  .state('app.tabs2.settings2', {
    url: "/settings2",
    views: {
      'settings2': {
        templateUrl: "templates/tabs2-settings2.html"
      }
    }
  });


  $urlRouterProvider.otherwise("/app/welcome");
  //$ionicConfigProvider.views.maxCache(0);
})

.controller('AppCtrl', function($scope) {
  console.log('AppCtrl');
})

.controller('WelcomeCtrl', function($scope) {
  console.log('WelcomeCtrl');
  
  $scope.some = {email: 'xxxx', is_default: true}
  
  console.log(ionic.Platform);
  
  $scope.ionic = ionic;
  
  $scope.data = {switcher: false};
  
   $scope.data.checkboxes =  [
       {name: 'red', value: true, disabled: true },
        {name: 'green', value: true, disabled: false },
        {name: 'blue', value: false, disabled: false }
     ];
    
            
     $scope.data.radios =  [
       {name: 'red_', id_default: false},
        {name: 'green_', id_default: false },
        {name: 'blue_', id_default: false }
     ];
  
  $scope.data.radioSelected = $scope.data.radios[1].name;
  
  $scope.onMeeterProfileEmailChange = function(name){
                console.log('onMeeterProfileEmailChange ' + name + ' count: ' + $scope.data.radios.length);
    
    angular.forEach($scope.data.radios, function(meeterAccountEmail) {
      
        console.log('loop ' + meeterAccountEmail.name);
      
            /*if (meeterAccountEmail.name === name) {
                  console.log('got it ' + name);
                meeterAccountEmail.is_default = true;
            }*/
        });
            };
  
  //#######################
  
  $scope.activeAccounts = [
  {
    "type": 2,
    "id": "FC0ADDAB-ED2D-4DC0-8FCE-19D344123CDB",
    "is_default": true,
       "calendars": [
      {
        "name": "shoustin@gmail.com",
        "id": "85E59867-1901-4FC1-A0C7-C02739249226",
        "type": 1,
        "active": true
      }
    ],
    "email": "shoustin@gmail.com",
    "is_verified": true,
    "title": "Gmail desc"
  },
  {
    "type": 2,
    "id": "830EA7A8-DAB1-42A5-97AB-D22F8F236098",
    "is_default": false,
       "calendars": [
      {
        "name": "shoustin.m@gmail.com",
        "id": "D1CEE91F-8D74-4060-8E9E-935A60596C24",
        "type": 1,
        "active": true
      }
    ],
    "email": "shoustin.m@gmail.com",
    "is_verified": true,
    "title": "shoustin.m desc"
  },
  {
    "type": -1,
    "id": "",
    "is_default": false,
    "password": "zzz",
    "calendars": [],
    "email": "wanameter@gmail.com",
    "is_verified": false,
    "title": "none"
  }
];
  
  $scope.activeAcc = {value: $scope.activeAccounts[0].email}
  
 
  $scope.onAccountChange = function(acc) {
    if ((acc)){
      angular.forEach($scope.activeAccounts, function(item) {
          item.is_default = false;
          if (item.email == acc.email) {
              item.is_default = true;
          }
      });

      return true;
    }
  };
  
  $scope.onMeeterProfileEmailChange = function(email) {
        console.log('onMeeterProfileEmailChange ' + email);


    };
  
})

.controller('LoginCtrl', function($scope,$timeout) {
  console.log('LoginCtrl');
  
  $scope.data = {value: "aaaaa"};
  
   $timeout(function() {
       $scope.data.value = "bbb";
    },5000);
  
  $scope.foo = function(){
    alert("aaa");
  }
  
})

.directive('wmPanel', function($parse) {
    return {
        restrict: 'E',
        transclude: true,
        scope: true,
        replace: true,
        template: '<div class="card-panel" id="wm-details-organizer" style="margin-top: 1px;padding: 1px; margin-bottom: 8px;">' +
                '<div ng-if="hasTitle" class="row wm-subheader-color"' +
                    'style="height:2.1rem;">' +
                    '<p>{{title}}</p>' +
                    '<a  href="" ng-if="hasIcon" ng-click="doWork()" style="color: rgb(68, 68, 68);cursor: pointer;"><i '+
                    'class="{{theIcon}}" style="padding: 0px;margin-right:0px;right: 10px;top:5px;position:absolute;"'+
                    '</i></a>'+
               '</div>' +
                '<div ng-transclude></div>'+
                '</div>',
        link: function(scope, elem, attrs) {
            
           
            scope.title = "no title";
            scope.hasTitle = (!attrs.title) ? false : true;
            scope.hasIcon =  false;
          
           if(attrs.wmIcon){
              scope.theIcon = attrs.wmIcon;
              scope.hasIcon =  true;
           }
            
            if (attrs.title !== undefined) {
                scope.title = attrs.title;
            }
            
          var unregister =  scope.$watch(
                    function() {
                        return attrs.title;
                    },
                    function(newValue, oldValue) {
                        if (newValue !== oldValue) {
                           scope.title = newValue;
                          unregister();
                        }
                    }
            );
          
          scope.doWork = function(){
            
            
            if(attrs.wmIconAction){
             console.log("aaa", attrs);
                scope.$eval(attrs.wmIconAction); 
            }
          };
          
     
          
        }//link
      
      
     
    };
});
              
            
!
999px
Promise you'll await for me.

Console