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>Ionic Template</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 ng-controller="MyCtrl">
    <ion-nav-bar class="bar-stable">
      <ion-nav-back-button class="button-clear">
      </ion-nav-back-button>
    </ion-nav-bar> 
    <ion-nav-view animation="slide-left-right">  
    </ion-nav-view>
    
    <script id="templates/tabs.html" type="text/ng-template"> 
      <ion-view>
        <ion-tabs class="tabs-custom tabs-icon-top">
          <ion-tab title="Alerts" ui-sref="tab.alerts" icon-on="icon-alerts-on" icon-off="icon-alerts-off">
            <ion-nav-view name="alerts" >
            </ion-nav-view>
          </ion-tab>
        </ion-tabs>
      </ion-view>
    </script>

    <script id="templates/alerts.html" type="text/ng-template"> 
      <ion-view title="home">
        <ion-content scroll="false">
          <div class="button-bar">
            <div class="col center" ng-class="{active: slideIndex == 0}" ng-click="slideTo(0)">
              slide 1
            </div>
             <div class="col center" ng-class="{active: slideIndex == 1}" ng-click="slideTo(1)">
              slide 2
            </div>
          </div>  
          <ion-slide-box id="slideboxcontainer" on-slide-changed="slideChanged($index)">
            <ion-slide>
              <ion-content>
                <h1>SLIDE 1</h1><p>Cosby sweater polaroid church-key +1 sartorial. Williamsburg Vice asymmetrical forage, locavore kitsch meggings quinoa roof party hashtag bitters. Ugh hoodie seitan bicycle rights, small batch keytar beard Odd Future wayfarers. Kitsch vinyl mixtape seitan craft beer. Carles wolf mustache ennui dreamcatcher swag, American Apparel DIY Thundercats organic you probably haven't heard of them pop-up. Whatever Austin Carles, flannel fixie gluten-free ethnic banjo ethical pug. Drinking vinegar ethnic mixtape, organic slow-carb pickled irony meggings.

Tattooed typewriter DIY, keffiyeh viral 8-bit Marfa disrupt Intelligentsia Blue Bottle Godard Thundercats irony stumptown salvia. Hashtag fap try-hard mumblecore American Apparel Intelligentsia meh. Butcher fashion axe keytar, authentic deep v Wes Anderson roof party 8-bit you probably haven't heard of them +1 beard mlkshk hashtag. Beard hella Brooklyn +1, kitsch Vice narwhal stumptown seitan authentic chillwave vegan Marfa. Tonx put a bird on it Etsy, crucifix mustache brunch American Apparel Pinterest kogi post-ironic. Helvetica Thundercats 3 wolf moon small batch. Food truck crucifix wolf, stumptown semiotics whatever salvia 3 wolf moon direct trade chia Kickstarter.

Tonx stumptown fanny pack selfies. Tousled cardigan bespoke skateboard post-ironic banh mi. Keffiyeh cray Vice, paleo messenger bag typewriter distillery stumptown High Life bitters Banksy deep v Helvetica bespoke. Polaroid High Life synth lo-fi. Fixie Tonx flannel, bitters ugh Pinterest narwhal kale chips freegan tofu Tumblr mumblecore. Food truck banjo Cosby sweater, raw denim Portland fashion axe hella. Banjo deep v tote bag typewriter.

Mustache direct trade 90's Schlitz ennui flexitarian. Twee semiotics retro, artisan Godard shabby chic mixtape pug Neutra keffiyeh 90's. Hoodie before they sold out Intelligentsia, shabby chic salvia twee biodiesel direct trade Kickstarter letterpress sriracha street art. Bushwick stumptown church-key mumblecore wolf drinking vinegar. Tonx cliche narwhal whatever shabby chic. Wayfarers butcher swag, seitan fap plaid scenester Echo Park messenger bag Kickstarter biodiesel 3 wolf moon letterpress. Street art pop-up direct trade banjo iPhone, Banksy mumblecore keffiyeh bespoke.

DIY cred street art literally, skateboard kitsch authentic Tonx. Aesthetic Schlitz scenester, literally lomo XOXO Pitchfork post-ironic biodiesel. Intelligentsia Portland gastropub banjo authentic Wes Anderson. Viral High Life Blue Bottle ethical pop-up Austin, bicycle rights 8-bit Shoreditch Williamsburg selfies pork belly leggings whatever. Raw denim Thundercats Marfa Odd Future pork belly you probably haven't heard of them. Kickstarter retro Tumblr, Portland hoodie pug freegan brunch. Mumblecore fixie Williamsburg pickled fingerstache, whatever brunch Neutra farm-to-table wayfarers tousled try-hard literally cornhole hella.</p>
              </ion-content>
            </ion-slide> 
             <ion-slide>
              <ion-content>
                <h1>SLIDE 2</h1><p>Cosby sweater polaroid church-key +1 sartorial. Williamsburg Vice asymmetrical forage, locavore kitsch meggings quinoa roof party hashtag bitters. Ugh hoodie seitan bicycle rights, small batch keytar beard Odd Future wayfarers. Kitsch vinyl mixtape seitan craft beer. Carles wolf mustache ennui dreamcatcher swag, American Apparel DIY Thundercats organic you probably haven't heard of them pop-up. Whatever Austin Carles, flannel fixie gluten-free ethnic banjo ethical pug. Drinking vinegar ethnic mixtape, organic slow-carb pickled irony meggings.

Tattooed typewriter DIY, keffiyeh viral 8-bit Marfa disrupt Intelligentsia Blue Bottle Godard Thundercats irony stumptown salvia. Hashtag fap try-hard mumblecore American Apparel Intelligentsia meh. Butcher fashion axe keytar, authentic deep v Wes Anderson roof party 8-bit you probably haven't heard of them +1 beard mlkshk hashtag. Beard hella Brooklyn +1, kitsch Vice narwhal stumptown seitan authentic chillwave vegan Marfa. Tonx put a bird on it Etsy, crucifix mustache brunch American Apparel Pinterest kogi post-ironic. Helvetica Thundercats 3 wolf moon small batch. Food truck crucifix wolf, stumptown semiotics whatever salvia 3 wolf moon direct trade chia Kickstarter.

Tonx stumptown fanny pack selfies. Tousled cardigan bespoke skateboard post-ironic banh mi. Keffiyeh cray Vice, paleo messenger bag typewriter distillery stumptown High Life bitters Banksy deep v Helvetica bespoke. Polaroid High Life synth lo-fi. Fixie Tonx flannel, bitters ugh Pinterest narwhal kale chips freegan tofu Tumblr mumblecore. Food truck banjo Cosby sweater, raw denim Portland fashion axe hella. Banjo deep v tote bag typewriter.

Mustache direct trade 90's Schlitz ennui flexitarian. Twee semiotics retro, artisan Godard shabby chic mixtape pug Neutra keffiyeh 90's. Hoodie before they sold out Intelligentsia, shabby chic salvia twee biodiesel direct trade Kickstarter letterpress sriracha street art. Bushwick stumptown church-key mumblecore wolf drinking vinegar. Tonx cliche narwhal whatever shabby chic. Wayfarers butcher swag, seitan fap plaid scenester Echo Park messenger bag Kickstarter biodiesel 3 wolf moon letterpress. Street art pop-up direct trade banjo iPhone, Banksy mumblecore keffiyeh bespoke.

DIY cred street art literally, skateboard kitsch authentic Tonx. Aesthetic Schlitz scenester, literally lomo XOXO Pitchfork post-ironic biodiesel. Intelligentsia Portland gastropub banjo authentic Wes Anderson. Viral High Life Blue Bottle ethical pop-up Austin, bicycle rights 8-bit Shoreditch Williamsburg selfies pork belly leggings whatever. Raw denim Thundercats Marfa Odd Future pork belly you probably haven't heard of them. Kickstarter retro Tumblr, Portland hoodie pug freegan brunch. Mumblecore fixie Williamsburg pickled fingerstache, whatever brunch Neutra farm-to-table wayfarers tousled try-hard literally cornhole hella.</p>
              </ion-content>
            </ion-slide>  
          </ion-slide-box>
         </ion-content> 
      </ion-view>

    </script>
  </body>
</html>

              
            
!

CSS

              
                body {
  cursor: url('https://ionicframework.com/img/finger.png'), auto;
}
#slideboxcontainer {
	position:relative;
	height: 100%;
	.scroll {
		height:100%;
	}
	
	.item-divider {
		border:0px;
		background-color:#FFF;
	}
	
	.slider {
		height: 100%;
		z-index: 150;
	}
}

.ion-slide {
  background-color: red;
}
.center {
  text-align:center;
}
.active {
  
  background-color:red;
}

              
            
!

JS

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

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

	$urlRouterProvider.otherwise('/tab/alerts');

	$stateProvider
	    // setup an abstract state for the tabs directive
	.state('tab', {
		url: "/tab",
		abstract: true,
		templateUrl: "templates/tabs.html"
	})
	
	.state('tab.alerts', {
			url: '/alerts',
			views: {
			// the main template will be placed here (relatively named)
				'alerts': 
			{ 
				templateUrl: 'templates/alerts.html',
			}
		}
	})
	
})

.controller('MyCtrl', function($scope, $ionicSlideBoxDelegate, $timeout) {
 // Called to navigate to the main app
		$scope.slideTo = function(index) { 
			$ionicSlideBoxDelegate.slide(index);
		};
		$scope.slideIndex = 0;
		// Called each time the slide changes
		$scope.slideChanged = function(index) {
			$scope.slideIndex = index;
		}; 
  
})


              
            
!
999px

Console