Skip to content
This repository was archived by the owner on May 8, 2023. It is now read-only.
This repository was archived by the owner on May 8, 2023. It is now read-only.

Javascript Implementation Issues #12

@abaucum

Description

@abaucum

I added the Javascript code to my app.js file and followed the instructions, however, I am getting this error:
file:///app/app.js:16:22: JS ERROR TypeError: undefined is not an object (evaluating 'application.resources['fonticon'] = fonticon')

Here is the code for my app.js file:

require("./bundle-config");
var application = require('application');
var fiAll = require('nativescript-fonticon');
var TNSFontIcon = fiAll.TNSFontIcon;
var fonticon = fiAll.fonticon;

TNSFontIcon.debug = true; // Optional. Will output the css mapping to console.
TNSFontIcon.paths = {
'fa': 'font-awesome.css',
'ion': 'ionicons.css'
};
TNSFontIcon.loadCss();

application.resources['fonticon'] = fonticon;
application.start({ moduleName: 'app-root/app-root' });

I also named the font awesome ttf file "fontawesome-webfont.ttf". Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions