Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Could not find Angular Material core theme


hi,

I am getting below error in my angular metronic project. What would be the solution for that !

Do I have to set core theme ?
if yes, Will it change the default look and feel of metronic ?


src_app__metronic_layout_layout_module_ts.js:1 Could not find Angular Material core theme. Most Material components may not work as expected. For more info refer to the theming guide: https://material.angular.io/guide/theming


and because of this metronic tooltip is not working also !!!


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 Rohan,

Could you please provide more details about the steps you've taken so far, including whether you are using ng serve or ng build.

May I know which Metronic Angular version are you using? Is it the latest one?

Thanks



Hi Faizal,

I am getting them in browser's console when opened project in vs code and run by ng serve -o command.

image

I am using version 8.1.7 which also I want to update to latest, please let me know steps on that too.



Hi Rohan,

It seems there might be a confusion regarding the usage of Angular Material core theme in Metronic. We no longer utilize the Angular Material core theme. Have you manually added it? As per our understanding in the recent versions, this issue is not present.

Thanks



Hi Faizal,

I have not explicitly added Angular Material core theme in project. May be some components are using it ??

Also if I'm using mat-icon, would it be okay ?
What about showing tooltip on hovering controls, metronic have same feature! I tried to use material tooltip which needs Angular Material core theme



Hi,

Could you please try adding the following line to your `/demo1/src/assets/sass/style.angular.scss` file:


@import "~@angular/material/prebuilt-themes/deeppurple-amber.css";


By adding this line, you're importing the deep purple and amber theme provided by Angular Material, which could address the core theme missing issue.

Regarding the usage of `mat-icon`, if you've already imported Angular Material into your project, you should be able to use `mat-icon` components.

Many of Metronic's components, including tooltips, are built using jQuery, which might not align with Angular's architecture. Angular comes with its own suite of libraries for building components and features. For a more compatible integration, it's advisable to find Angular's native 3rd party libraries when incorporating additional components.


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