0

In the context of an angular material typescript app, I am trying to use the md-content directive listed in the angular material documentation here:

https://material.angularjs.org/latest/demo/content And here: https://material.angularjs.org/latest/api/directive/mdContent

But I cannot figure out how to import the right angular material module which contains this directive.

I tried searching all the available modules here: https://material.angular.io/components/toolbar/api

I tried importing all the available module as listed here: How to import all Angular Material modules in Angular 9

None of the above has worked, i still get the basic error: "error NG8001: 'md-content' is not a known element."

Please note that I am able to import and use all the other modules just fine. I am just not able to find this specific one.

R. Richards
  • 24,603
  • 10
  • 64
  • 64

1 Answers1

1

Are you using Angularjs? or Angular (from Angular2 to Angular12,13,...).

I say this because the doc you show is old, for angularjs, not for Angular which has its own in: material.angular.io

A new componet that fits with yours (mdcontent), could be this one, < mat-expansion-panel > :

https://material.angular.io/components/expansion/overview