Search code examples
cordovameteormaterialize

materializecss + meteor (materialize-meteor library): how to render icons? (or other framework which works)


As reported as in issue on Github: https://github.com/d0minikk/materialize-meteor/issues/20 (but I don't see activity there which could mean the project is not supposed anymore)

Alternatively to fix this issue, what is one CSS/whatever framework for Material Design which works nicely with Meteor (1.1+) + Cordova (5.0+)?

I tried both menu (which on official Material Design web site, to Materializecss refer to, is present) and toc

 <i class="material-icons">menu</i>
 <i class="material-icons">toc</i>
as explained at: http://materializecss.com/icons.html

I understand that it may be need to add

<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

but where? (since I'm not using Materializecss directory but as a Meteor module. Also I'm using iron:router which doesn't let me put tag anywhere)

This renders instead

from the example at: http://materializecss.com/side-nav.html

However this is documented nowhere (as far as I know).


Solution

  • You can just create a new HTML file somewhere in your project with this code:

    <head>
        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
    </head>