Karim
Karim

Reputation: 1313

Angular loading blank screen on Chrome, no errors in console

I have an AngularJS app that works and loads well in most browsers and versions.

However, I have noticed that some people seem to be having issues loading the page on Chrome. I use Chrome as well and have tested it on all of the most recent versions; in fact, some of the people having the issues use exactly the same version of Chrome as I have and I can't seem to replicate the issue on my computer.

Checking the console, there are absolutely no errors at all. All I see is the following, which aren't part of my normal console outputs when the site does load: enter image description here

I've tried disabling the cache on these browsers that seem to be having the issue but that doesn't make any difference at all. Chrome is the only browser that this happens in as well.

Checking the network tab, it looks like all of the components on the site are loaded with a HTTP 200 status as well so it doesn't look like anything is failing to load.

Looking in the source code, it looks like all the scripts are loading fine. I have a ui-view and and ng-include in my app that render the rest of the app. Looks like those aren't being rendered at all as they show up empty (ONLY in specific people's Chrome browsers):

<div ui-view autoscroll="false"></div>


<ng-include src="'components/loginAndSignupModal/loginAndSignupModal.html'">  </ng-include>
<ng-include src="'components/intercom/intercomChatBox.html'"></ng-include>

Tried changing CORS headers to * and that didn't work. Both the ui-view and the ng-include divs end up not rendering (only the Angular generated comments show up that indicate that the directives are there.)

Anyone have any ideas what could be happening?

Upvotes: 6

Views: 2957

Answers (2)

Bamieh
Bamieh

Reputation: 10936

you are using ui-router to setup the view routes, do you have it properly setup in your angular app javascript?

<div ui-view autoscroll="false"></div>

the view will need to be populated for anything to appear on the screen, example:

here is a plunker example: http://plnkr.co/edit/u18KQc?p=preview

(source https://github.com/angular-ui/ui-router)

Upvotes: 1

khajaamin
khajaamin

Reputation: 876

Hi Karim I had same issue once upon time but solve when changed to angularjs version from 1.3 to 1.5.x unfortunately x i can't remember but please check and let me know your both version of chrome and angular please.

Upvotes: 1

Related Questions