Ion-icon is not working after upgrading to ionic 4 r.c 2

“ion-icon” is not working after upgrading to ionic 4 r.c 2.
Previously it was working.

Ionic:

ionic (Ionic CLI) : 4.7.1 (C:\Users\shafi\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-rc.2
@angular-devkit/build-angular : 0.11.4
@angular-devkit/schematics : 0.8.7
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.1.0

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.2
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.1, (and 8 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\shafi\AppData\Local\Android\Sdk)
NodeJS : v10.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

If you upgraded from before rc1, you need to update your angular.json file

Rc1 breaking changes

Yes i have upgraded from rc0 to rc2…I am not understanding how to solve…

Shoot I think I sent the wrong link

angular.json

{
  "projects": {
    "app": {
      "architect": {
        "build": {
          "options": {
            "assets": [
              {
                "glob": "**/*",
                "input": "src/assets",
                "output": "assets"
              },
             {
               "glob": "**/*.svg",
               "input": "node_modules/ionicons/dist/ionicons/svg",
              "output": "./svg"
             }

Rc1 icon breaking changes

after adding it ion-icon is working. But now the problem is that ion-icon is not working when used inside a icon only button

Can you post the problematic code?

              <ion-button color="primary" shape="round" fill="outline" size="small" [routerDirection]="'forward'" [routerLink]="['/admin-product-form', item.id]">
                  <ion-icon slot="icon-only" name="paper"></ion-icon>
                </ion-button>
                <ion-button color="danger" shape="round" fill="outline" size="small" (click)="remove(item.id)">
                    <ion-icon slot="icon-only" name="trash"></ion-icon>
                  </ion-button>

try removing the slot="icon-only" and see if that affects your UI

Still it’s not working. ‘ion-icon’ is not working within button. I have updated the angular.json file and also i have updated the latest ionic 4 version 4.0.0

1 Like