-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentdocsThis issue is related to documentationThis issue is related to documentationhelp wantedThe team would appreciate a PR from the community to address this issueThe team would appreciate a PR from the community to address this issue
Description
Bug, feature request, or proposal:
Bug/Feature Request
What is the expected behavior?
The guide "Creating a custom form field control" should give an example with a custom MatFormFieldControl that implement ControlValueAccessor.
What is the current behavior?
The guide advise us to use:
constructor(..., @Optional() @Self() public ngControl: NgControl) { ... }
But it leads to a cyclic dependancy error:
ERROR Error: Uncaught (in promise): Error: Template parse errors:
Cannot instantiate cyclic dependency! NgControl
What are the steps to reproduce?
Here is a StackBlitz
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/material: 2.0.0-beta.12
@angular/core: 4.4.4
@angular/cli: 1.4.4
typescript: 2.4.2
Windows 10 64bit
Chrome/Firefox/Edge
Is there anything else we should know?
I do not think so.
sylvaindumont, johankvint, VirajNimbalkar, mpschaeuble, Ike353 and 5 more
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentdocsThis issue is related to documentationThis issue is related to documentationhelp wantedThe team would appreciate a PR from the community to address this issueThe team would appreciate a PR from the community to address this issue