bower install ng-coverflow --savenpm installnpm testgruntCoverflow title text
How far side elements will be pushed backwards (in pixels). Selected item is always displayed in original size (200x200 px).
Rotation angle of side elements (in degrees)
Brightness of side elements (0..1)
Offset of side elements (in pixels)
If
truethe coverflow becomes infinite (trueorfalse)
Array of items (see below for item specification)
Current selected item index
Reference to item click callback function
Normally you can use any object with the following properties defined:
title,subtitleandimageUrl. For more complex cases you can use utility services provided (see next section).
{ title: 'Title', subtitle: 'Subtitle', imageUrl: 'http://placekitten.com/g/200/200' }Factory function which creates directive-compatible data object. Defined in the module
ng-coverflow.utils.
If you'd like to use your own objects as a data source for coverflow you might wrap them with directive-compatible object using this service. You can then access original data via
sourceproperty. Defined in the moduleng-coverflow.utils.
angular.module('app', [ 'ng-coverflow.utils' ]).controller('AppCtrl', [ '$scope', 'employeeService', 'ngCoveflowItemAdapterFactory', function ($scope, employeeService, adapterFactory) {
$scope.employees = [ ];
$scope.load = function () {
employeeService.load().then(function (response) {
$scope.employees = response.data.map(function (employee) {
return adapterFactory(employee, { title: 'name', subtitle: 'phoneNumber', imageUrl: 'avatar' });
});
});
};
$scope.selectEmployee = function (wrappedItem) {
var originalData = wrappedItem.source;
};
} ]);<ng-coverflow header="This is coverflow" items="items" item-click="itemClickHandler(item)"></ng-coverflow>