Re: SmartMenus with AngularJS

Home Forums Older releases 0.9.x SmartMenus with AngularJS Re: SmartMenus with AngularJS

#1632
admin
Keymaster

The initialization code is basically the following:

$('#main-menu').smartmenus({
	subMenusSubOffsetX: 1,
	subMenusSubOffsetY: -8
});

So in your case you would need to call this as soon as the menu element is populated by the AngularJS code.

In case you need to call this before the HTML is inserted (for any reason), you can then call the refresh API method after it is populated to refresh your menu tree:

$('#main-menu').smartmenus('refresh');

You can find a short code sample in the docs:

http://www.smartmenus.org/docs/#refreshInstance

Cheers!

Register

You will be emailed a link to set your password.

Login

Lost password?