-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(create-injectable): providedIn root by default
- Loading branch information
Showing
3 changed files
with
48 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a948b31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @nartc,
before it was better, IMO:
createInjectable(() => {}, {providedIn: 'root'})
does (even without studying the ngxtension docs)scoped
sounds like a new concept, but its just the old Injectable decorator default (scoped
would let me think I better check the docs ;))a948b31
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @spierala. I like that the function should imitate what developer are already used to.
To provide in root, we need to specify it.
'scoped' nobody knows that word and nobody will know what it does. If someone new is ready the code and not used to ngxtension, he will not know what is going on, or that root is by default.