Skip to content

bug: ion-back-button ignores global config for backButtonText #24052

Closed

Description

@vadimwe

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x

Current Behavior

ion-back-button ignores global config:

IonicModule.forRoot({ backButtonText: '', }),

Expected Behavior

back button contains only icon

Steps to Reproduce

Update to "@ionic/angular": "^5.8.3" with "@angular/*": "~12.2.9"

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 6.17.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.8.3
@angular-devkit/build-angular : 12.2.9
@angular-devkit/schematics : 12.0.3
@angular/cli : 12.2.9
@ionic/angular-toolkit : 4.0.0

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 10.1.0, ios 6.2.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 16 other plugins)

Utility:

cordova-res : 0.15.3
native-run : 1.4.1

System:

Android SDK Tools : 26.1.1 (/Users/vs/Library/Android/sdk)
ios-deploy : 1.11.4
ios-sim : 8.0.2
NodeJS : v12.18.3 (/usr/local/bin/node)
npm : 6.14.6
OS : macOS Big Sur
Xcode : Xcode 13.0 Build version 13A233

Additional Information

No response

Activity

  1. site-chenwei commented on Oct 11, 2021

    @site-chenwei

    I also encountered this problem

  2. vadimwe commented on Oct 11, 2021

    @vadimwe
    Author

    Quick fix if you need.

    variables.scss or another global file:
    ion-back-button { &::part(text) { display: none; } }

  3. EinfachHans commented on Oct 11, 2021

    @EinfachHans
    Contributor

    I debugged a bit. Looks like this commit causes this.

    config.reset(configObj); in the initialize is first called with:

    _zoneGate: function(),
    backButtonText: "",
    persistConfig: false
    

    and then called again (from defineCustomElements.globalScripts) with:

    m: Map {"persistConfig" => false, "backButtonText" => "", "_zoneGate" => function, "mode" => "ios"} ,
    persistConfig: false
    
  4. added
    package: angular
    type: bug
    on Oct 11, 2021
  5. added this to the 5.8.4 milestone on Oct 11, 2021
  6. liamdebeasi commented on Oct 11, 2021

    @liamdebeasi
    Contributor

    Thanks for the issue. This has been resolved via #24054, and a fix will be available in an upcoming release of Ionic Framework.

  7. liamdebeasi commented on Oct 11, 2021

    @liamdebeasi
    Contributor

    This is fixed in Ionic Angular v5.8.4. Thanks for the report!

    npm install @ionic/angular@latest
    
  8. ionitron-bot commented on Nov 10, 2021

    @ionitron-bot

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

  9. locked and limited conversation to collaborators on Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: angulartype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions