-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removing module.id does not resolve issues in Webpack builds #1003
Comments
The fix on Angular 2 is definitely the correct one. The original issue isn't coming from Angular Material 2. We were adding the fix, to remove all I personally use
Would be good to share some code, if so. |
I do not think Webpack is possible in a plunkr so here is what I believe is the relevant code. https://gist.github.com/gregbown/f1545665a35fdf8b2b7f8e0aaaaa6197 |
It is definitely not possible to share Webpack 😄 - You are right, I just asked for some code snippets to take a closer look for common issues. Would be good if you transform your code snippets into an external snippet. |
Thanks for the tip, I'm a bit of a git rookie, we have our own version control internally. |
@gregbown At first look I couldn't really find anything wrong in your shared code. But I have to say I don't had really much time to look into it. I'm still assuming this doe relates to something else, and not to the If the
|
Update: |
I just tested it again to be sure that I don't miss anything.
Here is some basic setup to share Just to repeat my self, it doesn't even make sense that it works with the |
Thank you Paul. I believe the issue was in my webpack configuration, I may never know exactly where. I scrapped my hacked together webpack.config and started with the bare minimum. I used https://github.com/preboot/angular2-webpack/webpack.config.js as a starting point, modifying the loaders and paths as needed. Thanks again for your time. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I believe the fix that resolved all errors stemming from module.id with Angular 2 rc5 in webpack builds is this fix to metadata_resolver
angular/angular@f54f9ef
Removing moduleId from md-input breaks functionality for all material 2 components in webpack (unsure about other build processes) when using attributes like formControlName and placholder.
The error:
zone.js:461 Unhandled Promise rejection: Template parse errors:
Can't bind to 'placeholder' since it isn't a known property of 'md-input'.
If 'md-input' is an Angular component and it has 'placeholder' input, then verify that it is part of this module.
If 'md-input' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schema' of this component to suppress this message.
If I add schemas: [CUSTOM_ELEMENTS_SCHEMA] to @NgModule I get the error.
“No value accessor for form control” even though control is named.
Additionally, removal of module.id seems to cause display and positioning errors.
Adding back module.id into all material components restores all functionality provided the fix to metadata_resolver is in place and ther are no errors or display issues.
Versions: Angular 2 rc5, Material 2 alpha 7-2, Windows 10, Chrome
Thank you
The text was updated successfully, but these errors were encountered: