I'm trying to use the angular2-busy
library in an angular project created with the CLI, but am having an issue importing the stylesheet:
<link rel="stylesheet" href="/node_modules/angular2-busy/build/style/busy.css">
The browser is telling me that it cannot find the file, even with the correct path. I also checked that the file exists, and it does. When I take out the rel="stylesheet"
I don't get the error, but then the animations don't work.
Here is the package I am trying to use, if anyone is curious: https://www.npmjs.com/package/angular2-busy
You can link this external file (. css file) to your HTML document file using the < link > tag . You can place this < link > tag Within the < head > section, and after the < title > element of your HTML file.
Linking your HTML and CSS filescss file is in the same folder as your index. html file. The rel attribute tells the browser that this is a stylesheet. The type attribute tells the browser that this linked file should be interpreted as CSS syntax.
CSS can be added to HTML documents in 3 ways: Inline - by using the style attribute inside HTML elements. Internal - by using a <style> element in the <head> section. External - by using a <link> element to link to an external CSS file.
Angular CLI have it's own way to initialize your global css/js.
They are located in .angular-cli.json
configuration
Locate "styles":
and add your css there
Example :
"styles": [ "../node_modules/angular2-busy/build/style/busy.css", "styles.css" ],
Hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With