Skip to content

removing module.id does not resolve issues in Webpack builds #1003

@gregbown

Description

@gregbown

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions