Metronic 8.1.5 Demo7 Angular Version - Modals Module Error

Hi, do you have any idea why there's an error after adding ModalsModule in the app.module.ts.

Uncaught TypeError: Cannot read properties of undefined (reading 'ModalsModule')
at Module.ModalsModule (widgets.module.ts:231:28)
at 71706 (layout.module.ts:84:5)
at __webpack_require__ (bootstrap:19:1)
at 40789 (page-info.service.ts:17:21)
at __webpack_require__ (bootstrap:19:1)
at 9694 (tiles-widget14.component.html:20:71)
at __webpack_require__ (bootstrap:19:1)
at 85157 (tiles-widget3.component.html:4:23)
at __webpack_require__ (bootstrap:19:1)
at 76407 (widgets.module.ts:231:28)

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 (2)

Hi Royland Andrino,

Probably ModalsModule is already added to the layout.module.ts. We will check this further and provide you with a solution soon.

Thanks

Hi,

I've checked your case, weird webpack behavior.
Anyway, for now try to change import from short to the full path: import { ModalsModule } from './_metronic/partials/layout/modals/modals.module'; and it should work.

Regards,
Keenthemes support

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  :(