devyumao / angular2-busy

Show busy/loading indicators on any promise, or on any Observable's subscription.
http://devyumao.github.io/angular2-busy/demo/asset/
MIT License
314 stars 102 forks source link

Mobile display issues (CSS issues) #49

Closed techn1fire closed 7 years ago

techn1fire commented 7 years ago

It looks like styles and animations are not showing on mobile devices (iPhone 7 plus, iOS 10.3) PC works fine, but for the same site on mobile I get display issues: http://pasteboard.co/2DQKkErg7.png http://pasteboard.co/2DQYsT8Ks.png

techn1fire commented 7 years ago

It looks like this is happening on all devices. Only on the production site.

I deploy my project with firebase-tools to the firebase hosting platform, and it looks like the busy.css is not being included properly. Right now in my index.html I'm including the busy.css from node_modules/angular2-busy/build/style/busy.css I get no issues when running dev with ng serve

Using angular-cli 1.0.0, updated @angular/core (components) to 4.1.0-beta.0

techn1fire commented 7 years ago

I think I found the solution. It's similar to an issue I had with font-awesome css.

I commented out the CSS inclusion in my index.html, and added the CSS file to my .angular-cli.json under Styles. Here is a copy of my .angular-cli.json:

{ "$schema": "./node_modules/@angular/cli/lib/config/schema.json", "project": { "name": "PROJECT" }, "apps": [ { "root": "src", "outDir": "dist", "assets": [ "assets", "favicon.ico" ], "index": "index.html", "main": "main.ts", "polyfills": "polyfills.ts", "test": "test.ts", "tsconfig": "tsconfig.app.json", "testTsconfig": "tsconfig.spec.json", "prefix": "app", "styles": [ "styles.css", "../node_modules/font-awesome/css/font-awesome.css", "../node_modules/angular2-busy/build/style/busy.css" ], "scripts": [], "environmentSource": "environments/environment.ts", "environments": { "dev": "environments/environment.ts", "prod": "environments/environment.prod.ts" } } ], "addons": [ "../node_modules/font-awesome/fonts/*.+(css|css.map|otf|eot|svg|ttf|woff|woff2)" ], "e2e": { "protractor": { "config": "./protractor.conf.js" } }, "lint": [ { "project": "src/tsconfig.app.json" }, { "project": "src/tsconfig.spec.json" }, { "project": "e2e/tsconfig.e2e.json" } ], "test": { "karma": { "config": "./karma.conf.js" } }, "defaults": { "styleExt": "css", "component": {} } }

P.S. If you want to install font-awesome icons, this should help you as well.