Ask Your Question
0

How to mention custom icon in NavMenu in DLUX Module

asked 2016-10-10 09:48:17 -0700

Mandeep gravatar image

I am adding menu item in Dlux GUI (as part of new module implementation). Below is example from Dlux Develoer Guide http://docs.opendaylight.org/en/stabl...

var module = angular.module('app.a_module', ['app.core']);
    module.config(function(NavMenuHelper) {
    NavMenuHelper.addToMenu('myFirstModule', {
        "link" : "#/module/index",
        "active" : "module",
        "title" : "My First Module",
        "icon" : "icon-sitemap",
        "page" : {
            "title" : "My First Module",
            "description" : "My first module"
        }
    });
});

In above example "icon" value is 'icon-sitemap', all possible values are either picked from odl-dlux-core or from loader-module (loader-resources/src/main/resources/assets/images/). But I wanted to have my custom icon (example "icon" : "mymodulemenu_icon").

I do not want to re-compile loader module only to add my custom icon. I tried bundling assets with my module and referring but no luck.

Any suggestion & pointer?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-10-14 05:07:45 -0700

mmcoulome gravatar image

Hi,

The icon value need to be a class name. In this case, it's icon-sitemap who is part of the icon collection from font-awesome 3.

If you want to add your own icon, you will have to define it in your css file and link it there.

edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-10-10 09:48:17 -0700

Seen: 52 times

Last updated: Oct 14 '16