Get 2024 Templates Mega Bundle!$1000 worth of 19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets for just $99
Get for 99$

Livewire Metrinic 9


How can I integrate Metrinic with Livewire using `wire:navigate`? When I use JavaScript, it stops working after navigating to another page.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi,

Thank you for reaching out to us.

At the moment we haven't tried combining Metronic 9 with Livewire.

Are you getting errors when using wire:navigate?

Regards,
Lauris Stepanovs,
Keenthemes Support Team



I don't have any errors but the JS doesn't load with wire:navigate



Hi,

Can you try to refer to https://keenthemes.com/metronic/tailwind/docs/getting-started/integration/vue guide and initialize the components globally via the KTComponents.init() method?

The SPA integration guide should be similar to Laravire as well.
You can also refer to the starter kit apps for Metronic 9 Tailwind:
https://github.com/keenthemes/metronic-tailwind-html-integration

Regards,
Sean



Would it work for Livewire? Where would you put init in app.js?



Hi Alex,

As mentioned above we haven't tried combining Livewire with the latest Metronic version.

Generally in all freamworks, the javascript initialization can be done the same way as we do in our Vue version by calling KTComponents.init().

I guess in Livewire javascript files must be placed within the @script and @endscript. You can refer to this section which explains how to use and execute javascript in Liverwire.

Regards,
Lauris Stepanovs,
Keenthemes Support Team


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(