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.

              <div ng-app="app" ng-controller="MainController">
  <button ng-click="toggleTrackBy()">Show or Hide Track By Example</button><br /><br />
  <label>Update Speed (ms): <input type="text" ng-model="updateSpeed" />
  </label><br />
  <label>Number of rows to render: <input type="text" ng-model="rowsMax" />
  <br /><br />
  <div>Time to generate randoms: {{generateMS}}ms</div>
  <div>Time to render: {{renderTime}}ms</div>
  <br />
  <div ng-if="!showTrackBy">
    <strong>This is the non-track by example.</strong>
    <table class="non-track-by">
      <tr ng-repeat="random in randomNumbers">

  <div ng-if="showTrackBy">
    <strong>Track By Example:</strong>
    <table class="track-by">
      <tr ng-repeat="random in randomNumbers track by $index">
              table {
  width: 500px;
.non-track-by td {
  border-bottom: 1px solid red;
.track-by td {
  border-bottom: 1px solid green;

.track-by {
  border: 1px solid green;
.non-track-by {
  border: 1px solid red;
              angular.module("app", [])
  .controller("MainController", ['$scope', '$interval', '$timeout',
    function($scope, $interval, $timeout){
      $scope.test = "Hello world!";
      $scope.showTrackBy = false;
      $scope.updateSpeed = 500; //ms
      $scope.rowsMax = 500;
      $scope.generateMS = 0;
      $scope.renderTime = 0;

      $scope.toggleTrackBy = function(){
         $scope.showTrackBy = !$scope.showTrackBy;
      $scope.generateRandoms = function(){
         var startTime = new Date().getTime();
         $scope.randomNumbers = [];
         var i = 0;
         for(; i < $scope.rowsMax; i++){
               number: 100 * Math.random()
         $scope.generateMS = new Date().getTime() - startTime;
           $scope.renderTime = new Date().getTime() - startTime;
         }, 0);
      $interval($scope.generateRandoms, $scope.updateSpeed);
Loading ..................