Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Metronic Angular theme and included javascript libraries


Hi Guys,

Is there a way to re-initiate javascript functions in my component partials.
It seems these are loaded asynchronously and bindings to all the metronic scripts are lost, i.e. the click event on the menu.
Im using an angular component on the menu to load in navigation from an API.
Something like the data-kt-menu-trigger="click" on the menu doesnt work when using a component to load templates into the DOM.

I would be interested to see if this is possible.
The alternative is to recreate all the events within my components which seems like complete overkill.

Using AngularJS v1.8.

thanks in advance.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Java Training in Aurangabad

[url= course in Aurangabad[/url]



Hi,

I think it's possible. Try to check src/app/_metronic/layout/components/scripts-init/scripts-init.component.ts file.
I think you can write helpers with pluginsInitialization method, and call it where you need to reload plugins.

Regards,
Keenthemes support


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(