angular-css icon indicating copy to clipboard operation
angular-css copied to clipboard

Embed CSS without file

Open oravecz opened this issue 10 years ago • 4 comments

Is there a way to specify the CSS to inject as a set of rules in text format? I mean, without having to reference a CSS file?

oravecz avatar May 29 '15 15:05 oravecz

Hi @oravecz

This feature is not currently supported. Marking as an enhancement.

Alex

alexcastillo avatar May 29 '15 16:05 alexcastillo

Why dont u use a

felixfbecker avatar Jun 16 '15 21:06 felixfbecker

I want to distribute these directives as a module, and by referencing it as a path means the developer using these components will have to place the CSS in a particular path location on their web server. This can be problematic for some deployments, and is a major reuse impediment. Web components have this solved, Angular does not, but angular-css has an opportunity to make it a bit more seamless.

oravecz avatar Jun 17 '15 12:06 oravecz

Yeah but instead of using

<link rel="stylesheet" href="..."/>

just use

<style>
    /*CSS goes here*/
</style>

in your template

felixfbecker avatar Aug 08 '15 18:08 felixfbecker