Ionic ng-click inside ion-slide-box


#1

Hi guys,

I used ion-slide-box with ng-repeat and ng-click …ng-click is working with the first slide only and the next slide ng-click is not working.

Here’s my hierarchy:

 <ion-slide-box ng-show="deals" delegate-handle  = "flashcard" show-pager		 = "false" active-slide	 = "currentIndex" on-slide-changed = "slideHasChanged(currentIndex)" auto-play="true" does-continue= "true" slide-interval="5000">
      <ion-slide ng-repeat="x in records_deals">
        <!-- <ion-slide ng-repeat="item in items | orderBy:random"> -->
        <div class="container my-object" ng-click="getProductDetails(x.product_id,x.dealsPrice,x.product_name,x.seller_id)">
          <div class="flashcard" ng-class="{'flipped':isFlipped}">
            <md-card md-theme="default" class="border-radius-5" >
              <md-card-title>
                <md-card-title-text>
                  <span class="normal-text-bold">{{x.product_name}}</span>
                  <span class="price"><b>{{x.dealsPrice | currency:"&#8377;"}}</b></span>
                </md-card-title-text>
                <md-card-title-media>
                  <div class="md-media-sm card-media"><img ng-src="{{x.image}}"/></div>
                </md-card-title-media>
              </md-card-title>
            </md-card>
          </div>
        </div>
     </ion-slide>
   </ion-slide-box>

#2
           <ion-slide-box ng-show="deals" delegate-handle  = "flashcard" show-pager		 = "false" active-slide	 = "currentIndex" on-slide-changed = "slideHasChanged(currentIndex)" auto-play="true" does-continue= "true" slide-interval="5000">
  <ion-slide ng-repeat="x in records_deals">
    <!-- <ion-slide ng-repeat="item in items | orderBy:random"> -->
    <div class="container my-object" >
      <div class="flashcard" ng-class="{'flipped':isFlipped}">
        <md-card md-theme="default" class="border-radius-5"  ng-click="getProductDetails(x.product_id,x.dealsPrice,x.product_name,x.seller_id)">
          <md-card-title>
            <md-card-title-text>
              <span class="normal-text-bold">{{x.product_name}}</span>
              <span class="price"><b>{{x.dealsPrice | currency:"&#8377;"}}</b></span>
            </md-card-title-text>
            <md-card-title-media>
              <div class="md-media-sm card-media"><img ng-src="{{x.image}}"/></div>
            </md-card-title-media>
          </md-card-title>
        </md-card>
      </div>
    </div>
 </ion-slide>

Try this


#3

Can you tell what changes you made? It will be better for me to understand.


#4

ng-click set in your md-card


#5

Okay … I tried that to but no luck


#6

Why are you using ng-click???For display product details in other page?


#7

yes. When i click on the slide it should display the product details in another page. In onclick i have to set some local storage as well


#8

store imageId in session in method of ng-click
And get it where you want to display its detail…no need to take more than one parameters in ng-click
Yesterday I suggested code to implement that was keep ng-click in md-card
That was worked for me