Comments (7)
Hi @ElMohMoh I use the following and the icon is rendered :
<Button text="{{'fa-facebook' | fonticon}} Inloggen Facebook" class="fa btn btn-primary facebookButton" (tap)="loginFacebook()">
I also have a module where I import the TNSFontIconModule like this :
import { NativeScriptModule } from "nativescript-angular/platform";
import { NativeScriptFormsModule } from "nativescript-angular/forms";
import { NgModule } from "@angular/core";
import { TNSFontIconModule, TNSFontIconService } from 'nativescript-ngx-fonticon';
import { LoginComponent } from "./login.component";
@NgModule({
imports: [
NativeScriptModule,
NativeScriptFormsModule,
TNSFontIconModule.forRoot({
'fa': 'fonts/font-awesome.css'
})
],
declarations: [
LoginComponent
]
})
export class LoginModule { }
And then in the component's constructor I do this :
private fonticon: TNSFontIconService,
Only problem I have with this is that my text is cut off
from nativescript-fonticon.
@moayadnajd Thanks that seems to work
from nativescript-fonticon.
Hello, this still isnt working. i tried
<Button text="{{'fa-sign-in | fonticon}} Sign In" class="fa btn btn-primary btn-md" tap="signIn" />
from nativescript-fonticon.
hey maybe this syntax will help
<Label class="fa" text="{{ fonticon('fa-home') + 'Home' }}"></Label>
from nativescript-fonticon.
don't work for me.
// NativeScript Vue 2
<Label
class="fa"
text="{{ fonticon('fa-home') + 'Home' }}"
></Label>
Get error
text="{{ fonticon('fa-home') + 'Home' }}": Interpolation inside attributes has been removed
from nativescript-fonticon.
A little bit late but this is working for Vue:
<Label class="fa">{{'fa-home' | fonticon}} Home</Label>
but I dont know how you can add a Text after the Icon
from nativescript-fonticon.
Thanks I will try
from nativescript-fonticon.
Related Issues (20)
- Updating the ion-icons library to version 2 HOT 2
- Javascript Implementation Issues
- [Nativescript-Vue] Font Awesome 5, it show [Question Mark] HOT 15
- [Nativescript-Vue] nativescript-fonticon v2 - update guide HOT 14
- material-design-icons css parsing issue HOT 1
- Is there a Javascript version of this? HOT 5
- Doesn't work with single quotes on CSS
- [IOS] : Font Awesome 5 PRO - Light icon always displayed as solid HOT 2
- why (fa-spin it's not working HOT 1
- Some icons work, some icons do not...
- how to integrate with scss HOT 1
- [Nativescript-Vue] CSS file being loaded after home page is mounted HOT 1
- [Nativescript-Vue] CSS file being loaded after home page is mounted HOT 7
- not working with materialdesignicons
- Using with angular 4 HOT 1
- update to Nativescript 3 HOT 10
- Problem with Icomoon iconfonts HOT 1
- Webpack bug HOT 3
- Use with TabView HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nativescript-fonticon.