mat- prefix error
See original GitHub issueHello, I looked everywhere for an answer but every fix didn’t work. I have done the fix to convert md to mat and I added:
MATERIAL_COMPATIBILITY_MODE, useValue: true
and NoConflictStyleCompatibilityMode,
Bug, feature request, or proposal:
BUG
What is the expected behavior?
What is the current behavior?
ERROR Error: The “mat-” prefix cannot be used in ng-material v1 compatibility mode. It was used on an “mat-menu” element. at getMdCompatibilityInvalidPrefixError (compatibility.js:21) at new MatPrefixRejector (compatibility.js:32) at createClass (core.es5.js:10936) at createDirectiveInstance (core.es5.js:10764) at createViewNodes (core.es5.js:12212) at createEmbeddedView (core.es5.js:12095) at callWithDebugContext (core.es5.js:13493) at Object.debugCreateEmbeddedView [as createEmbeddedView] (core.es5.js:12839) at TemplateRef_.webpackJsonp…/…/…/core/@angular/core.es5.js.TemplateRef_.createEmbeddedView (core.es5.js:10279) at ViewContainerRef_.webpackJsonp…/…/…/core/@angular/core.es5.js.ViewContainerRef_.createEmbeddedView (core.es5.js:10056)
What are the steps to reproduce?
<mat-menu #notificationsMenu="matMenu" [overlapTrigger]="false">
<div td-menu-header class="mat-subhead">Notifications</div>
<mat-nav-list dense>
<ng-template let-last="last" ngFor [ngForOf]="[0]">
<div *ngFor="let i of mydemands">
<a mat-list-item *ngIf="i.haylpers.length != 0">
<mat-icon mat-list-avatar>today</mat-icon>
<h4 matLine><span class="text-wrap" ><span class="highlight"> <a routerLink="/profile" routerLinkActive="active"><i class="mdi-action-add-shopping-cart"></i> {{i.title}}</a></span><span *ngIf="i.haylpers.length > 1" class="new badge" data-badge-caption="réponses">{{i.haylpers.length}}</span> <span *ngIf="i.haylpers.length === 1" class="new badge" data-badge-caption="réponse">{{i.haylpers.length}}</span></span></h4>
<p matLine> <time class="media-meta" datetime="2015-06-12">{{i.date | date:'h:mma'}}</time></p>
</a>
</div>
<mat-divider></mat-divider>
</ng-template>
</mat-nav-list>
<button mat-button color="accent" td-menu-footer>
See All Notifications
</button>
</mat-menu>
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4.4.4 Angular material 2.0.0-beta.12
Any idea?
Regards,
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top GitHub Comments
@vicochips Still facing issue?? Try to delete
package-lock.json
file and do a freshnpm i
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.