I'm using AngularJS. Up to this point, I've loaded CSS that is specific to my partials by linking it in at the top of the partial:
<!-- File: some_partial.html -->
<link rel="stylesheet" href="link/to/some_partial.css" />
<!-- Rest of partial code here -->
This doesn't feel right. The CSS isn't linked in the <head>
(making it non-standard), and every once in awhile, the styles don't actually get applied to the partial.
What is the correct way to lazy load CSS in Angular, deferring until the partial is actually needed?