Skip to content

No "content" property in Loading Component options. No way to put custom HTML in IonLoading #17520

Closed

Description

@distante

In the Loading Docs 'creating' part there is this part:

any optional HTML can be passed in the content property.

But there is no content property exposed:

image

Using HTML in the message property will just render the html as string and using angular safeHTML will yield this:

const loader = this.loadingCtrl.create({
        message: this.sanitizer.bypassSecurityTrustHtml(loadingText) as string + 'test',
        spinner: 'dots'
});

SafeValue must use [property]=binding:

That worked in Ionic 3

Ionic Info

Ionic:

   ionic (Ionic CLI)             : 4.10.2 (C:\Users\distante\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.1
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.0
   @ionic/angular-toolkit        : 1.3.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.3, (and 21 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\distante\AppData\Local\Android\sdk)
   NodeJS            : v10.14.1 (C:\Program Files\nodejs\node.exe)
   npm               : 6.5.0
   OS                : Windows 10

Activity

  1. changed the title [-]No "content" property in Loading Component options. No way to put custom HTML in loading[/-] [+]No "content" property in Loading Component options. No way to put custom HTML in IonLoading[/+] on Feb 17, 2019
  2. added
    package: core
    type: bug
    on Feb 18, 2019
  3. kensodemann commented on Apr 25, 2019

    @kensodemann
    Contributor

    Closing this as PR #18126 fixes the documentation as it currently stands, and Feature Request #18135 addresses the need to address this in some way, whether it is through the reinstatement of the content parameter mechanism or some other mechanism is an open question.

  4. ionitron-bot commented on May 25, 2019

    @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.

  5. locked and limited conversation to collaborators on May 25, 2019
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: coretype: bug

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions