Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Not able to use Icons from HTML Template in Angular


Hello,

I am trying to use the icons from HTML template to Angular but it shows blank only.

https://preview.keenthemes.com/html/metronic/docs/icons/keenicons

Can you please help me out that how to use it in my angular project?

Thanks in Advance. Appreciated.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (3)


Hi Durvesh,

To use the KeenIcons in your Angular project, make sure you have imported the necessary CSS files. Here's how you can import the KeenIcons CSS files in your project:

1. In your Angular project, locate the file where you have your global styles defined. This file is usually named `/src/styles.scss`.

2. Open the file and add the following import statements at the top, before any other styles:


@import "./assets/plugins/keenicons/duotone/style.css";
@import "./assets/plugins/keenicons/outline/style.css";
@import "./assets/plugins/keenicons/solid/style.css";


Make sure the paths to the CSS files are correct based on the location of your assets directory.

3. Save the file, and the KeenIcons CSS styles should now be available throughout your Angular project.

After importing the CSS files, you can use the KeenIcons in your Angular templates using their respective class names. Refer to the KeenIcons documentation ( https://preview.keenthemes.com/html/metronic/docs/icons/keenicons ) for the available icons and their corresponding class names.

I hope this helps! Let me know if you have any further questions.

Thanks



Hi Faizal,

Thank you so much for the detailed stepwise go through for the icons. I really appreciate it. It really helped to understand the flow of css and icons.

You are doing great work.

Thanks.



You're very welcome! I'm glad to hear that. If you have any more questions or need further assistance, please don't hesitate to ask. Keep up the great work.

Thanks


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(