-
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
Don't use ngModel in md-paginator #5717
Comments
I suppose the underlying issue here is that |
Yes, that always seems strange to me, but I don't know the logic behind the design...
This means that every complex component that composes other material components might run into this issue... I don't think it can stay like that, it forces the developer to use template driven forms or at least import them just for that purpose... |
Currently `md-select` can only really be used together with `@angular/forms` which is overkill for simple usages where it only sets a value (for example, the only reason the paginator module brings in the `FormsModule` is the select). These changes introduce the `value` two-way binding that can be used to read/write the value without using `ngModel` or a `formControl`. This also aligns it with the input module. Relates to angular#5717.
Currently `md-select` can only really be used together with `@angular/forms` which is overkill for simple usages where it only sets a value (for example, the only reason the paginator module brings in the `FormsModule` is the select). These changes introduce the `value` two-way binding that can be used to read/write the value without using `ngModel` or a `formControl`. This also aligns it with the input module. Relates to #5717.
Currently `md-select` can only really be used together with `@angular/forms` which is overkill for simple usages where it only sets a value (for example, the only reason the paginator module brings in the `FormsModule` is the select). These changes introduce the `value` two-way binding that can be used to read/write the value without using `ngModel` or a `formControl`. This also aligns it with the input module. Relates to #5717.
* feat(select): support basic usage without @angular/forms Currently `md-select` can only really be used together with `@angular/forms` which is overkill for simple usages where it only sets a value (for example, the only reason the paginator module brings in the `FormsModule` is the select). These changes introduce the `value` two-way binding that can be used to read/write the value without using `ngModel` or a `formControl`. This also aligns it with the input module. Relates to #5717. * chore: add demo
Since it's now possible to use `md-select` without `ngModel`, we can remove the dependency on `@angular/forms` from the paginator. Fixes angular#5717.
Since it's now possible to use `md-select` without `ngModel`, we can remove the dependency on `@angular/forms` from the paginator. Fixes #5717.
Since it's now possible to use `md-select` without `ngModel`, we can remove the dependency on `@angular/forms` from the paginator. Fixes #5717.
Since it's now possible to use `md-select` without `ngModel`, we can remove the dependency on `@angular/forms` from the paginator. Fixes angular#5717.
Since it's now possible to use `md-select` without `ngModel`, we can remove the dependency on `@angular/forms` from the paginator. Fixes #5717.
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. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Material components should be form agnostic (template/reactive)
What is the current behavior?
md-paginator
usesngModel
in its templateThe text was updated successfully, but these errors were encountered: