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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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 >
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
 <!-- ionic/angularjs scripts -->
<link href="" rel="stylesheet">
<script src=""></script>

<!--<script src="lib/ionic/js/ng-cordova.js"></script>
<script src="lib/ionic/js/angular/"></script>
<script src="cordova.js"></script>
 <body ng-app="starter">

      <ion-header-bar class="bar-assertive">
        <h1 class="title">Alphabet</h1>
      <ion-content ng-controller="alphabetController" scroll="false">

        <ion-slides options="options" slider="data.slider">
          <ion-slide-page ng-repeat="letters in alphabets">
            <div class="box"><img ng-src="{{letters.img}}"></div>
            <audio src="{{trustSrc(}}" type="audio/mpeg" class="audio"></audio>



                /* Empty. Add your own CSS if you like */

.box {
    width: 100%;
    height: 100%;
    text-align: center;

/*show no pager */
	display: none;

/*styling images in swiper */

.swiper-slide img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;



                angular.module('starter', ['ionic'])
.controller('alphabetController', function($scope, $ionicSlideBoxDelegate, $ionicLoading, $sce) {
	$scope.alphabets = [
			img: '',
			audio: ''
			img: '',
			audio: 'audio/camel.wav'
			img: '',
			audio: 'audio/camel.wav'

	$scope.options = {
	  loop: true,
	  effect: 'fade',
	  speed: 5000,
	  autoplay: true

	$ = function(src){
		var media = new Media(src, null, null, mediaStatusCallback);

	var mediaStatusCallback = function(status){
		if (status == 1) {
			${template: 'Loading'});

	$scope.$on("$ionicSlides.sliderInitialized", function(event, data){
	  // data.slider is the instance of Swiper
	  $scope.slider = data.slider;

	$scope.$on("$ionicSlides.slideChangeStart", function(event, data){

	$scope.$on("$ionicSlides.slideChangeEnd", function(event, data){
	  // note: the indexes are 0-based
	  $scope.activeIndex = data.slider.activeIndex;
	  $scope.previousIndex = data.slider.previousIndex;

	$scope.trustSrc = function(src) {
    return  $sce.trustAsResourceUrl(src);


//this is the function that helps decide which sound to play
function myFunction(number) {
    var player = document.querySelectorAll(".audio");

//note I can't really find an audio url online. Just find one and try it out.