castillo-io/angular-css

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

Open

#68 建立於 2016年6月5日

在 GitHub 查看
 (4 留言) (6 反應) (0 負責人)JavaScript (473 star) (91 fork)batch import
bughelp wanted

描述

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! 😁

貢獻者指南