opened
QuentinFchx
username_0
<!-- Before submitting an issue, please consult our docs (https://ionicframework.com/docs/). -->

<!-- Please make sure you are posting an issue pertaining to the Ionic Framework. If you are having an issue with the Ionic Appflow services (Ionic View, Ionic Deploy, etc.) please consult the Ionic Appflow support portal (https://ionic.zendesk.com/hc/en-us) -->

<!-- Please do not submit support requests or "How to" questions here. Instead, please use one of these channels: https://forum.ionicframework.com/ or http://ionicworldwide.herokuapp.com/ -->

<!-- ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->

# Bug Report

**Ionic version:**
<!-- (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1) -->
<!-- (For Ionic 2.x & 3.x issues, please use https://github.com/ionic-team/ionic-v3) -->
[x] **4.7**

**Current behavior:**
<!-- Describe how the bug manifests. -->
When no `ion-` components are present in an ionic application, the `body` element is hidden.

**Expected behavior:**
<!-- Describe what the behavior would be without the bug. -->
`<body>` should not be hidden when no `ion-` component are present

**Steps to reproduce:**
- Create an angular application
- Inject ionic `structure.css`
- Inject `IonicModule`
- Do not include any `ion-` component
- => blank screen
- Add any `ion-` component
- => app displayed

**Other information:**
We're using ionic for:
- `@ionic-native` plugins (we have a cordova version of the app)
- Platform and Storage services

We don't have much `ion-` components. We're mainly using `@angular/components` and custom ones.

Related issues:
- https://github.com/ionic-team/ionic/issues/18649

**Ionic info:**
<!-- (run `ionic info` from a terminal/cmd prompt and paste output below): -->

```
Ionic:

   Ionic CLI                     : 5.2.1 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.7.0
   @angular-devkit/build-angular : 0.801.2
   @angular-devkit/schematics    : 8.1.2
   @angular/cli                  : 8.1.2
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms : android 8.0.0, ios 4.5.5
   Cordova Plugins   : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 12 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.7 (update available: 0.2.8)

System:

   Android SDK Tools : 26.1.1 (/usr/local/share/android-sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 8.0.1
   NodeJS            : v11.15.0 (/Users/anonymous/.nvm/versions/node/v11.15.0/bin/node)
   npm               : 6.7.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001
```
bug: .hydrated class not being set on <html> if no ion- components are present
issue
closed
adamdbradley
username_1
issue
created
gnowland
username_2
I agree that the better behavior would be to apply the `display: none;` to `<app-root>` or similar, as I have a plain-html (so it appears before angular loads) "loading" overlay that appears for a split second but then gets hidden as soon as ionic sets `html:not(.hydrated) body { display: none; }` while it loads, defeating the purpose... which would happen with or without an ionic component being present...
comment