cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.


  <meta charset="utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

  <title>Angular Promise Queue</title>

    <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script>
    <script src="http://www.loringdodge.com/files/angular-promise-queue.js"></script>

  <body ng-app="starter">

      <ion-header-bar class="bar-stable">
        <h1 class="title">Angular Promise Queue</h1>
      <ion-content class="padding">

      <p style="text-align:center">A way to queue up promises. In this case...queue up animations</p>

      <button id="start" class="button button-positive">

        <div class="slideLeft">This</div>
        <div class="slideRight">is</div>
        <div class="slideLeft">an</div>
        <div class="slideRight">example</div>
        <div class="slideLeft">of</div>
        <div class="slideRight">a</div>
        <div class="slideLeft">promise</div>
        <div class="slideRight">queue</div>


              word-slide {
  margin-top: 50px;
  text-align: center;

word-slide div {
  font-size: 24px;
  line-height: 40px;

.slideLeft {
  transform: translateX(-30px);
  opacity: 0;

.slideRight {
  transform: translateX(30px);
  opacity: 0;

.slideLeft.enter, .slideRight.enter {
  transform: translateX(0px);
  opacity: 1;
  transition: all 0.3s ease-out;

  left: 50%;
  transform: translateX(-50%);
  text-align: center;
              angular.module('starter', ['ionic', 'promise-queue'])

  .directive('wordSlide', function(PromiseQueue) {

    return {
      restrict: 'E',
      link: function($scope, $element, $attrs) {

        /* Listen for a transition! */
        var transitionEvent = whichTransitionEvent();

        var elements = $element.children();

        var promiseQueue = new PromiseQueue();

        var slideIn = function(el){
          return function(done) {
            angular.element(el).addClass('enter').one(transitionEvent, function(e) {


          var startButton = document.getElementById('start');
          angular.element(startButton).on('click', function() {

          function whichTransitionEvent(){
            var t;
            var el = document.createElement('fakeelement');
            var transitions = {

            for(t in transitions){
              if( el.style[t] !== undefined ){
                return transitions[t];


Loading ..................