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 class="container" ng-app="filtersWithFinley" ng-controller="finleyController">
  <div class="row">
    <div class="col-xs-12 text-center puppy-buttons">
      <button class="btn btn-info" ng-click="myFilter = {type: 'puppy'}">
        Puppy
      </button>
      <button class="btn btn-success" ng-click="myFilter = {type: 'teen'}">
        Teen
      </button>
      <button class="btn btn-primary" ng-click="myFilter = {type: 'dog'}">
        Dog
      </button>
      <button class="btn btn-danger" ng-click="myFilter = {type: ''}"><span class="glyphicon glyphicon-remove"></span>
        Remove Filter
      </button>
    </div>
  </div>
    
  <ul class="row">
    <li class="col-xs-12 col-md-4 thumbnail" ng-repeat="finley in finleys |  filter:myFilter"><img ng-src="{{finley.imageUrl}}" />
    </li>
  </ul>
  
</div>

            
          
!
            
              img {
  width: 200px;
  height: 200px;
}

li {
  list-style-type: none;
}

.puppy-buttons {
  margin: 15px 0 15px 0;
}


            
          
!
            
              angular.module('filtersWithFinley', [])

.controller('finleyController', function($scope) {
  
$scope.finleys = [{
        type: 'puppy',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_puppy2_zpsarpl2uad.jpg'
    }, {
        type: 'puppy',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_puppy_zpsav4un7ch.jpg'
    }, {
        type: 'puppy',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_puppy3_zpseyuyoikv.jpg'
    }, {
        type: 'teen',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_teen_zpsj8uxqouu.jpg'
    }, {
        type: 'teen',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_teen2_zpsoft9gj07.jpg'
    }, {
        type: 'teen',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_teen3_zps4qjvo293.jpg'
    }, {
        type: 'dog',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_dog3_zpspdhaokcf.jpg'
    }, {
        type: 'dog',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_dog2_zpss0eangjf.jpg'
    }, {
        type: 'dog',
        imageUrl: 'http://img.photobucket.com/albums/v433/Tracetrace/finley_dog_zpsuuzp9llp.jpg'
    }];
  
});

            
          
!
999px
Loading ..................

Console