2

I have an ng-click action that I want to fire when a user clicks on an item in the angular-carousel. I have tried several different approaches and so far no luck. Also I was able to switch states using <a ui-sref="state,({params: params})"> but I need to call an encoding function on the $rootScope on the parameters (to encode the url of the new state)

HTML (small snippit)

  <ui-carousel slides="comsData.adminComs" slides-to-show="slidesToShow" slides-to-scroll="1" initial-slide="1" autoplay="false" dots="true">
    <carousel-item>
      <a data-ng-click="doStuff()">

and the controller

$scope.doStuff = function() {
  console.log('did stuff');
};

right now I'm keeping it simple because as soon as I can get the function to fire the rest is easy

Ringo
  • 3,795
  • 3
  • 22
  • 37
Sean Malter
  • 337
  • 3
  • 14

0 Answers0