NathanWalker / nativescript-ngx-fonticon

Use custom font icon collections seamlessly with NativeScript + Angular.
MIT License
76 stars 39 forks source link

NS 5.4.2: basic template --ng with fonticon don't show anything #57

Open gbonline opened 4 years ago

gbonline commented 4 years ago

Hi, I'm trying the new NS 5 (tns doctor say 5.4.2) with fonticon I' tryied with command tns create demofonticon --ng and followed the configuration instructions provided here for fonticon icons, with ttf files downloaded from the site.
Then in theitem-detail.component.html I've added a label with the bluetooh fonticon as you write in the example code

But nothing show! Nope an empty square for icon not found: simply blank!

I've followed a simple "solution" found on the issues answers, where it say to add some instruction to webpack.config.js as { from: { glob: "assets/**" } }, ( below the lìnk of the solution https://github.com/NativeScript/nativescript-dev-webpack/issues/616#issuecomment-406509824 ) But nothing changes!

What can I do to show the icons? thanks

gbonline commented 4 years ago

Hi' found a solution: move the new folders "fonts" and "assets" from app to src add { from: { glob: "assets/**" } }, to the webpack.config.js set forRoot as {'fa': './assets/fontawesome.css'} as the same css name in assets folder. set in app.css .fa { font-family:"Font Awesome 5 Free", "fa-regular-400.ttf"; font-weight: 400; } then you can use pipe fonticon

georgyevv commented 4 years ago

Dude thank you very much I wasted so much time for this and your comment saved me. I hope the description of the plugin gets updated because it is outdated.

naloqab commented 4 years ago

Instead of an icon I get a box. Not sure if that's what you guys were getting. I tried what @gbonline suggested but that didn't work for me.