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
Change FormBuilder scope to "root" #48237
Comments
If there even is a reason it was provided with the module, I'm curious about the new solution? Imho deprecating treeshakable module providers (with no alternative way?) was not a good decision. |
How would you import the formBuilder? |
Why not just provide it in root? Its a singleton / stateless anyway. So no need to import it, just use it? |
This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237.
This reverts commit 4cf5c6b.
Update formbuilder docs Implement suggestions refactor(forms): make FormBuilder classes provided in root This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237. Revert "Change the scope of the formbuilder(issue angular#48237)" This reverts commit 4cf5c6b. Revert "refactor(forms): make FormBuilder classes provided in root" This reverts commit 20528ae. Make formBuilder availible in root Restore profile-editor.component.2.ts
refactor(forms): make FormBuilder classes provided in root This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237.
refactor(forms): make FormBuilder classes provided in root This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237. Remove reactiveFormsModule import refactor(forms): make FormBuilder classes provided in root refactor(forms): make FormBuilder classes provided in root This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237.
This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237.
refactor(forms): make FormBuilder classes provided in root This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237.
So the old module scope was obviously just wrong? Now I got, why you deprecated this possibility. Never the less - is there still any posibility to provide a tree-shakable service with a module? |
You can annotate services with the |
Yeah, your probably right... I actually have none. But isn't the use-case imaginable that a module provides a service that can be used but there's no need to use it? Never the less, I'm coming from a module-based approach. And they are getting lesser anyway. Being a component / framework developer, I just don't like the idea of removing feature because they could be misused. By the way: was there a reason the FormBuilder was provided with the module? Or was this acatually just a misusage? |
I think it might have been to keep everything organized (if every service was provided in root, the documentation would probably be a mess). |
But if I'm not mistaken this would create a new |
@angelaki changing the |
@AndrewKushnir Yeah, sure. Providing it in |
…8245) refactor(forms): make FormBuilder classes provided in root This commit updates the FormBuilder classes to provide them in root instead of using a deprecated pattern of providing a service in a specific module using the `providedIn` syntax. Closes angular#48237. PR Close angular#48245
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. |
Which @angular/* package(s) are relevant/related to the feature request?
forms
Description
Not just is the
providedIn: module
syntax deprecated, is there any reason I do not see that it every was provided with the module and not as a singleton?FormBuilder
Proposed solution
providedIn: 'root'
Alternatives considered
The text was updated successfully, but these errors were encountered: