fanktom/angular-coverflow

On cover clcik

Closed this issue · 4 comments

Please add on cover click

You can do so by modifying the cover template:

Cover.prototype.template = function(){
  return '<div class="coverflow-cover coverflow-cover-id-' + this.coverId + '"></div>';
};

Additionally it could be helpfull to maybe pass a function that is called on click - feel free to submit a pull request!

how to pass coverId to click? I change the template to following, but it will never add the coverID to /goto

Cover.prototype.template = function(){
return '<a href="/goto/" + this.coverId><div class="coverflow-cover coverflow-cover-id-' + this.coverId + '"></div></a>';
}

try following, but it does not trigger the function in the ng-click:

Cover.prototype.template = function(){
    return '<a href ng-click="imageSelected()" class="coverflow-cover coverflow-cover-id-' + this.coverId + '"></a>';
};

I'm currently a little short on time, sorry.

But might have to check where the click bubbles to. You could use something like ng-inspector from https://chrome.google.com/webstore/category/apps?hl=en to find the right scope to catch the click.