Closed darmie closed 7 years ago
Please try 1.3.2
just published now if you are still having trouble. Note new usage guide for TNSFontIconModule
in readme, for example in your NgModule
:
imports: [
NativeScriptModule,
TNSFontIconModule.forRoot({
'fa': 'font-awesome.css'
})
]
The plug-in parses the CSS file and looks for rules containing :before
and then looks for the property content
. The original file ionicons.css has a rule at the beginning setting some defaults for all icons. This rule does not contain the property content
. The plugin does not check if val.split('content:')
has actually a value at position 1 of the resulting array. This basically breaks the plug-in. I removed all icon-specific selectors from the CSS file (e.g., .ion-android-bulb:before
). Then the plugin is able to parse the file.
@NathanWalker A simple if condition skipping rules not having a property content
would fix this :-) This should be line 71 in fonticon.service.ts
any PR is welcome for this
Ionicons adds the same "bloat", but I prefer just cleaning those files up. Less code to ship and run.
Node v4.2.1 NPM v2.14.7
Both ionicons.css and ionicons.ttf are on the root page. This is my
app.modul.ts
my component
login.component.ts
my XML
I am getting this error
I get a blank label