最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Angular site won't open on mobile - Stack Overflow

programmeradmin1浏览0评论

I simply cannot figure out what the problem is.

I have a very simple website made in angular that runs perfectly fine on the desktop (Chrome) but simply shows a blank page on my mobile (iPhone 6).

I have tried emulating it locally and online without any issues. I have run count less test from all different sites and they don't seem to find any issues.

The website is:

I know this is fairly unusual but I have attempted to fix this for the past 5 hours. Can anyone see what I've done wrong?

I simply cannot figure out what the problem is.

I have a very simple website made in angular that runs perfectly fine on the desktop (Chrome) but simply shows a blank page on my mobile (iPhone 6).

I have tried emulating it locally and online without any issues. I have run count less test from all different sites and they don't seem to find any issues.

The website is: https://admin.marcrasmussen.dk

I know this is fairly unusual but I have attempted to fix this for the past 5 hours. Can anyone see what I've done wrong?

Share Improve this question edited Aug 25, 2017 at 16:54 sergdenisov 8,5729 gold badges51 silver badges66 bronze badges asked Aug 21, 2017 at 11:16 Marc RasmussenMarc Rasmussen 20.6k83 gold badges223 silver badges383 bronze badges 2
  • On OS X (Safari), I'm getting a 404 on the resource https://admin.marcrasmussen.dk/vendor/angular-ui-router.js.map. The page itself is loading, however. – matthewninja Commented Aug 21, 2017 at 11:33
  • @matthewninja That is very odd the only angular-ui-router file i load is: <script src="vendor/angular-ui-router.js"></script> – Marc Rasmussen Commented Aug 21, 2017 at 11:37
Add a ment  | 

2 Answers 2

Reset to default 5

This is what i found debuggin your site.

is an issue of firebase-messagin.js check if for an update to support safari for ios. i found this other question on SO who asking similar issues . Firebase on iPad's Safari; Can't find variable: Notification Ask Question

what recoends is to turn off the notification prompt when detect the browser, to avoid the js crash.

You have this code in your App.js:

firebase.initializeApp(config);

var messaging = firebase.messaging();
messaging.requestPermission().then(...).catch(...);

Firebase client uses Notifications API that isn't supported by some browsers.

You can add the browser's support checking, for example:

if (!window.Notification && !window.webkitNotifications) {
    return;
}

firebase.initializeApp(config);

var messaging = firebase.messaging();
messaging.requestPermission().then(...).catch(...);
发布评论

评论列表(0)

  1. 暂无评论