Fork me on GitHub

angular-chute

AngularJS wrapper for Chute API.

Getting started

Follow instructions on GitHub.

Usage


      <div class="wall" ng-app="Test" ng-controller="MainCtrl">

        <div class="wall-item" ng-repeat="asset in assets">
          <img ng-src="{{asset.url}}/w/300" width="300">

          <div class="like icon-star" ng-class="{'active': asset.hearted()}" ng-click="asset.toggleHeart()"></div>
          
          <p>{{asset.caption}}</p>
          
          <ng-pluralize class="likes" count="asset.hearts" when="{'one':'1 like', 'other':'{} likes'}"></ng-pluralize>
        </div>

        <a class="load-more button" ng-show="assets.hasMore()" ng-click="assets.nextPage()">Load more</a>
      </div>
    

      angular.module('Test', ['chute']).controller('MainCtrl', ['$scope', 'Chute.API.Asset', function($scope, Asset) {
        $scope.assets = Asset.query({album: 'abcqsrlx', perPage: 3});
      }]);
    

{{asset.caption}}

Load more

Read more

Documentation available as annotated source code.