SuperVeetz SuperVeetz - 1 year ago 72
AngularJS Question

Stylesheets load but are empty on page refresh in nested state

I'm having an issue where if I refresh the page in a state that is nested in my AngularJS app, the browser shows that my stylesheets were loaded, but they are empty for some reason. I am using ui-router. There are no errors in my console. I am not sure if this has anything to do with the server, but I am using NodeJS with LoopBack framework.

View my issue here

If you navigate to one of the top-level states and refresh the page, the styles will appear.

Answer Source

You'll want to use a domain relative url for your stylesheet.

<link rel="stylesheet" type="text/css" href="/css/styles.css">

This will load your stylesheet from

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download