Skip to content

Commit ca3657e

Browse files
committed
Fix for #2. Don't disable stylesheet before the stylesheet is loaded
1 parent 6f23745 commit ca3657e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/angular-ui-router-css.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,9 +175,11 @@
175175
var definitionPromise = loadStyleDefinition(definition, {
176176
insertBefore: linkElementPlaceholder
177177
});
178-
179-
// temporarily disable the stylesheet until the state has been fully resolved to give a smooth transition
180-
definition.element.disabled = true;
178+
179+
definitionPromise.then(function() {
180+
// temporarily disable the stylesheet until the state has been fully resolved to give a smooth transition
181+
definition.element.disabled = true;
182+
});
181183

182184
// add the stylesheet promise to the definition
183185
definition.promise = definitionPromise;

0 commit comments

Comments
 (0)