melwinVincent / ionic4-star-rating

Star Rating component for ionic-4 projects
23 stars 11 forks source link

Accessing DOM Level Directives Fails Build Because CommonModule Not Imported #3

Closed MichaelGoberling closed 4 years ago

MichaelGoberling commented 5 years ago

Ionic Info


   Ionic CLI                     : 5.2.3 (c:\Users\micha\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.6.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Capacitor:

   Capacitor CLI   : 1.1.0
   @capacitor/core : 1.1.0

Cordova:

   Cordova CLI       : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v10.15.1 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Error:

<div class="ionic4-star-rating">
  <button [ERROR ->][ngStyle]="{'width' : fontSize, 'height' : fontSize}" *ngFor="let index of iconsArray" id="{{index}}"")
: Can't bind to 'ngStyle' since it isn't a known property of 'ion-icon'.
1. If 'ion-icon' is an Angular component and it has 'ngStyle' input, then verify that it is part of
this module.
2. If 'ion-icon' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of
this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("ay"
id="{{index}}" type="button" ion-button icon-only (click)="changeRating($event)">
    <ion-icon [ERROR ->][ngStyle]="{'color':index < this.Math.round(this.parseFloat(rating)) ? activeColor : defaultColor, 'f")
: Can't bind to 'ngForOf' since it isn't a known property of 'button'. ("
<div class="ionic4-star-rating">
  <button [ngStyle]="{'width' : fontSize, 'height' : fontSize}" [ERROR ->]*ngFor="let index of iconsArray" id="{{index}}" type="button" ion-button icon-only (click)="changeRat")
: Property binding ngForOf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations". ("
<div class="ionic4-star-rating">
  [ERROR ->]<button [ngStyle]="{'width' : fontSize, 'height' : fontSize}" *ngFor="let index of iconsArray" id="{{")
melwinVincent commented 4 years ago

Hello @MichaelGoberling

This issue has been fixed in the latest release npm i ionic4-star-rating@1.1.1

Please upgrade and confirm.

Regards, Melwin Vincent C