0

i can success on my development, but build it get errors, how should i do

Unhandled Promise rejection: Template parse errors: Can't bind to 'mdmenutriggerfor' since it isn't a known property of 'a'. ("Home Blog About ][mdmenutriggerfor]=theme>Theme Blue Ocean ][mdmenutriggerfor]=account>TaylorPzreal ; Task: Promise.then ; Value: Error: Template parse errors: Can't bind to 'mdmenutriggerfor' since it isn't a known property of 'a'. ("Home Blog About ][mdmenutriggerfor]=theme>Theme Blue Ocean ][mdmenutriggerfor]=account>TaylorPzreal http://localhost:3000/dist/vendor.b3014186753d08da08d0.js:2:451794) [] at TemplateParser.parse (http://localhost:3000/dist/vendor.b3014186753d08da08d0.js:2:632968) [] at JitCompiler._compileTemplate (http://localhost:3000/dist/vendor.b3014186753d08da08d0.js:2:819358) [] at [] Error: Template parse errors:

2 Answers 2

2

use selectors in list below instead of mdmenutriggerfor:

selector: `[md-menu-trigger-for], [mat-menu-trigger-for],
         [mdMenuTriggerFor], [matMenuTriggerFor]`,

<button md-icon-button [mdMenuTriggerFor]="menu"> <md-icon>more_vert</md-icon> </button>

note: [md-menu-trigger-for], [mat-menu-trigger-for] is deprecated.

source: https://github.com/angular/material2/blob/94320c4e68a8e6a2093b704157900cd6cd8388e2/src/lib/menu/menu-trigger.ts#L37-L38

Sign up to request clarification or add additional context in comments.

Comments

0

i solved it by two way:

  1. replace 'html-loader' with 'raw-loader';

  2. Comment out minimize line.

    new webpack.LoaderOptionsPlugin({
     htmlLoader: {
      minimize: DEVELOPMENT // workaround for ng2
     },
     // minimize: PRODUCTION, // Comment out this line
     debug: DEVELOPMENT,
     options: {
      context: __dirname
     }
    }),
    

2 Comments

what do you mean by this? I have the same problem so i need to fix this. where do I located "new webpack.LoaderOptionsPlugin ....
add it to plugins

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.