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>
  <head>
    <meta charset="utf-8" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
    <title>Tabbed Navigation</title>

    <!-- ionic css -->
    <link href="https://driftyco.github.io/ionic-code/nightly/css/ionic.min.css" rel="stylesheet">
    
    <script src="https://driftyco.github.io/ionic-code/nightly/js/ionic.bundle.js"></script>

	
  </head>

  <body ng-app="slidebox" animation="slide-left-right-ios7">

    <ion-nav-bar class="nav-title-slide-ios7 bar-positive">
        <ion-nav-back-button class="button-icon ion-arrow-left-c">
        </ion-nav-back-button>
    </ion-nav-bar>

    <ion-nav-view ng-controller="IndexCtrl"></ion-nav-view>
	
	<script id="index.html" type="text/ng-template">
      <ion-view title="Scrollable Tabbed Slide box">
	  <!--<ion-content  scroll="false"-->
        <ion-content 
			scrollbar-y="true">
          	
				<ion-slide-box 
					delegate-handle="mainSlideBox"
					show-pager="false" 
					on-slide-changed="slideHasChanged($index)">
					<ion-slide>
						<h3>Slide to nav 1</h3>
						<ion-list show-delete="data.showDelete" 
							show-reorder="data.showReorder">

							<ion-item ng-repeat="item in items" 
									  item="item"
									  href="#/item/{{item.id}}" class="item-remove-animate">
							  Item {{ item.id }}
							  
							</ion-item>

						  </ion-list>
					</ion-slide>
					<ion-slide>
						<h3>Slide to nav 2 </h3>
					</ion-slide>
					<ion-slide>
						<h3>Slide to nav 3</h3>
					</ion-slide>
					
				</ion-slide-box>
					
				
          	
        </ion-content>
		<ion-tabs class="tabs-striped tabs-background-stable tabs-color-positive"
						delegate-handle="mainTabs">

				  <ion-tab title="Home" icon="ion-home"
							ng-click=tabHasBeenClicked(0)>
					<!-- Tab 1 content -->
				  </ion-tab>

				  <ion-tab title="About" icon="ion-ios7-information"
					ng-click=tabHasBeenClicked(1)>
					<!-- Tab 2 content -->
				  </ion-tab>

				  <ion-tab title="Settings" icon-on="ion-ios7-gear" 
				  icon-off="ion-ios7-gear-outline"
				  ng-click=tabHasBeenClicked(2)>
					<!-- Tab 3 content -->
				  </ion-tab>

				</ion-tabs>	
      </ion-view>
    </script>
  </body>
</html>
              
            
!

CSS

              
                .slider-slide h3{
  margin-top:10px;
}

              
            
!

JS

              
                 var app = angular.module('slidebox', ['ionic'])
		.run(['$q', '$http', '$rootScope', '$location', '$window', '$timeout', 
					function($q, $http, $rootScope, $location, $window, $timeout){
	    
	        $rootScope.$on("$locationChangeStart", function(event, next, current){
	            $rootScope.error = null;
	            console.log("Route change!!!", $location.path());
	            var path = $location.path();
	            
	            
	            console.log("App Loaded!!!");
	        });
	    }
	    ]);
		
		app.config(function($stateProvider, $urlRouterProvider) {
			$stateProvider.state('index', {
				url : '/',
				templateUrl : 'index.html',
				controller : 'IndexCtrl'
			});
		
			$urlRouterProvider.otherwise("/");
		});
		
        app.controller("IndexCtrl", ['$rootScope', "$scope", 
					'$ionicSlideBoxDelegate', '$ionicTabsDelegate',
			function($rootScope, $scope, $ionicSlideBoxDelegate, $ionicTabsDelegate){
				
				$scope.tabs = [
					{"text" : "Home"},
					{"text" : "Games"},
					{"text" : "Mail"}
				];
				

				
				$scope.slideHasChanged = function(index){
					console.log('slide selectedIndex', index);
					$ionicTabsDelegate.$getByHandle('mainTabs').select(index);
					
					
				}
				$scope.tabHasBeenClicked = function(index){
					var tabsDelegate = $ionicTabsDelegate.$getByHandle('mainTabs');
					
					var selectedIndex  = tabsDelegate.selectedIndex();
					console.log('tab index', index);
					if (index == selectedIndex){return false;}
					tabsDelegate.select(index);
					console.log('tab selectedIndex', index);
					
					$ionicSlideBoxDelegate.$getByHandle('mainSlideBox').slide(index);
				}
				
				  
				  $scope.items = [
                { id: 0 },
                { id: 1 },
                { id: 2 },
                { id: 3 },
                { id: 4 },
                { id: 5 },
                { id: 6 },
                { id: 7 },
                { id: 8 },
                { id: 9 },
                { id: 10 },
                { id: 11 },
                { id: 12 },
                { id: 13 },
                { id: 14 },
                { id: 15 },
                { id: 16 },
                { id: 17 },
                { id: 18 },
                { id: 19 },
                { id: 20 }
				  ];
				
        }
        ]);
              
            
!
999px

Console