I'm working on an Angular Library, I have this simple menu :
<mat-menu #menu="matMenu" yPosition="below" style="margin-top: 45px;">
<button style="outline: none;" *ngFor='let button of card?.overflowmenu?.buttons' mat-menu-item
class="header-menu-item">
{{button.text}}
</button>
</mat-menu>
And the module looks like this.
import { NgModule } from '@angular/core';
import { CardComponent } from './card.component';
import { MatMenuModule } from '@angular/material/menu';
import { CommonModule } from '@angular/common';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { BrowserModule } from '@angular/platform-browser';
@NgModule({
declarations: [CardComponent],
imports: [
BrowserModule,
CommonModule,
BrowserAnimationsModule,
MatMenuModule,
],
exports: []
})
export class CardModule { }
When I do : $ng test @libraryname.
I get the error: Error: Export of name 'matMenu' not found!
Is there something I'm missing to import when building an Angular library?