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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

            
              <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>Simple List</title>
    
    <link href="//code.ionicframework.com/1.0.0/css/ionic.css" rel="stylesheet">
    <script src="//code.ionicframework.com/1.0.0/js/ionic.bundle.js"></script>
    <script type="text/javascript" src="http://yourjavascript.com/1155857813/ionic-image-lazy-load.js"></script>
  </head>

  
  <body ng-controller="MyCtrl">

    <ion-header-bar class="bar-positive">
      <h1 class="title">Cats</h1>
    </ion-header-bar>

    
    <ion-content lazy-scroll>
      
      
      <div class="list">

        <a ng-repeat="item in items" 
           href="#/{{item.id}}"
           class="item item-thumbnail-left">

          <!-- I've deliberately set the image-lazy-distance-from-bottom-to-load to a negative value to show you how the loader looks like. Put to a positive value to load the image before it is displayed  -->
          <img image-lazy-src="{{ item.image }}" image-lazy-loader="android" image-lazy-distance-from-bottom-to-load="-200">
          <h2>{{ item.name }}</h2>
        </a>

      </div>

    </ion-content>

  </body>
</html>
            
          
!
            
              body {
  cursor: url('https://ionicframework.com/img/finger.png'), auto;
}

.image-loader-container {
  margin: 9px;
  max-width: 81px;
  max-height: 81px;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  position: absolute;
  background-color: #e5e5e5;
  
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-content: stretch;
  align-items: center;
}
            
          
!
            
              angular.module('ionicApp', ['ionic', 'ionicLazyLoad'])


.controller('MyCtrl', function($scope) {
  // don't be scared by the image value, its just datauri
  
  $scope.items = [
    { id: 1, name: 'Cat 1', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 2, name: 'Cat 2', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 3, name: 'Cat 3', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 4, name: 'Cat 4', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 5, name: 'Cat 5', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 6, name: 'Cat 6', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 7, name: 'Cat 7', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 8, name: 'Cat 8', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 9, name: 'Cat 9', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 10, name: 'Cat 10', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' },
    { id: 11, name: 'Cat 11', image: 'http://i.huffpost.com/gen/964776/images/o-CATS-KILL-BILLIONS-facebook.jpg' }
  ];
  
})
 

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

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

Console