How can i use font-awesome icons in pages-menu?
See original GitHub issueIssue type
I’m submitting a … (check one with “x”)
- bug report
- feature request
- question about the decisions made in the repository
I need to know how to use font-awesome icons in pages-menu, the demo describe this as possible, but i don’t know how to use that icons in pages-menu, i have tried so many things, like add icon: ‘fas fa-iconname’, or icon: {icon: ‘fas fa-iconname’, pack: ‘fontawesome’}, i don’t know what can i do for this works.
Current behavior: When is defined property “icon:” with some icon from font-awesome, icon is not showed.
Expected behavior: Is expected that icon be showed.
Steps to reproduce: Change an item from pages-menu, with property icon with font-awesome related string, like ‘fas fa-check’.
Related code:
{
title: 'Declarações',
icon: 'fas fa-undo',
link: '/layout/stepper',
},
Other information:
npm, node, OS, Browser
NPM last version, Node.JS last version, windows 10, Chrome/Firefox
Angular, Nebular
Angular 8, Nebular 4.4.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top Results From Across the Web
How To Add Icons | Font Awesome Docs
To add an icon, you need to know a few bits of information: The shorthand class name for the style you want to...
Read more >Import Icons | Font Awesome Docs
Here's a primer on Font Awesome icon naming and how to import from icon ... The first version of Font Awesome used web...
Read more >Host Font Awesome Yourself
Using Web Fonts with CSS. The /css/all.css file contains the core styling plus all of the icon styles that you'll need when using...
Read more >Use a Kit | Font Awesome Docs
Then just add it to the <head> of each template or page of your project that you want to use Font Awesome icons....
Read more >Get Started with Font Awesome
You can download, customize, and use the icons and default styling manually. Both CSS and CSS Preprocessor (Sass and Less) formats are included....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you can use this code to use font-awesome as icon pack in-app module (“src\app\pages\pages.module.ts”)
export class PagesModule { constructor(iconsLibrary: NbIconLibraries) { iconsLibrary.registerFontPack('fa', { packClass: 'fa', iconClassPrefix: 'fa' }); iconsLibrary.registerFontPack('far', { packClass: 'far', iconClassPrefix: 'fa' }); // ... }); } }
and in page-menu (“src\app\pages\pages.menu.ts”){ title: 'Dashboard', icon: { icon: 'beer', pack: 'fa'}, link: '/pages/dashboard', home: true, },
see result here
I see, i have tested now and it works, but the icon is too large, i think this is something about the font size.