castillo-io / castillo-io/angular-css

[request] When loading stylesheet with ui-router, hide view until stylesheet loads

Open
#68 4 comments 6 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
JavaScript
Stars
464
Forks
84
PR merge metrics
No merged PRs in 30d

Description

With sufficiently large stylesheets, there is a noticeable flicker when loading the sheet; after the HTML renders, but before the CSS is applied. Angular and uiRouter both have solutions for this issue, but `angular-css` doesn't support either of them natively.

`ngCloak` does wait until the HTML renders, but the stylesheet lags behind considerably; and I can't find a way to use `angular-css` inside ui-router's `resolve`. Support for either of these would be fantastic. Personally, I think the `ngCloak` approach is more "Angular", but there _needs_ to be a way to wait for the stylesheet before showing the page.

Thank you so much for an otherwise amazing project! This feels like one of those things that are so obvious it's weird they're not built into Angular as it is. Keep up the good work! 😁

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing how angular-css loads stylesheets alongside AngularJS ui-router transitions, including the ngCloak and resolve approaches mentioned in the issue. Done should mean a routed view remains hidden until its stylesheet has loaded, using one clearly defined supported approach.

Written by the indexing model from the issue text.

Assessment

Tech stack
angularjs, css, javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.