andrucz / ionic2-rating

:star: Angular star rating bar. Built for Ionic 2+.
MIT License
178 stars 62 forks source link

Ionic 3: select one rating update them all #28

Closed ngware closed 6 years ago

ngware commented 6 years ago

Hello, I'm using Ionic v3.19.0. I have multiple ratings on the same page. When I click on one of them, every ratings in that page take the same value. It was ok before.

Here is the html I'm using to display ratings :

<ion-item>
          <h2 text-wrap>{{q.text}} :</h2>
          <rating [(ngModel)]="q.answer"
          readOnly="false"
          max="5"
          emptyStarIconName="star-outline"
          halfStarIconName="star-half"
          starIconName="star"
          nullable="false"
          value="q.answer"
          iconOnColor= red
          iconOffColor=  red
          (ngModelChange)="selectAnswer(q, $event)"> 
        </rating>
      </ion-item>

And my environment infos :

cli packages:

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 7.1.0 

local packages:

@ionic/app-scripts : 1.3.0
Cordova Platforms  : android 6.1.2 ios 4.5.3
Ionic Framework    : ionic-angular 3.0.1

System:

Android SDK Tools : 26.0.1
ios-deploy        : 1.9.2 
ios-sim           : 6.1.2 
Node              : v7.4.0
npm               : 5.5.1 
OS                : macOS Sierra
Xcode             : Xcode 9.1 Build version 9B55 

Environment Variables:

ANDROID_HOME : /Users/nicolas/Library/Android/sdk

Misc:

backend : pro
ngware commented 6 years ago

It was an issue in my own code...