-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Composed names on services is not a good idea. #72
Comments
It is fine. I have given it much thought and looked at plenty of style guides and examples regarding namespacing so this is not too uncommon. Since I am no longer using ngAnnotate I have to inline annotate anyway. Anything prefixed with |
Alright, as always I respect your decisions, I just point out things that are more weird. I never saw that namespacing tbh and I done a lot of angular so far. Leave it as is then, if it is not mean to be decorated by end users, good enough :) |
You might be right, I may have confused it with module namespacing notation, which is very common. Either way it's just an internal implementation detail. We can discuss whether to keep it or switch to camelCase later, after all primary issues are fixed. |
Yes, module notation is different, but yes, let's talk about that after things are fixed. |
@Foxandxss If I namespace each service into its own module called angular.module('satellizer', ['satellizer.popup']); Will angular.module('MyApp', ['ngResource', 'ngMessages', 'ngRoute', 'satellizer', 'mgcrea.ngStrap']) |
no, it will be "public", so i can use it like: angular.module('foo', ['satellizer.popup']) can't really see how that causes an issue, tho :-) |
The thing is, why you need private? You don't. People will still inject "satellizer" to use the library, but if they need to inject the other inner services for something, let them do it!, You shouldn't restrict what they can do. |
Hey @sahat . You new convention of
satellizer.foo
to name the different services is not a good idea.That only works with array notation like:
but not with:
For internal usage is ok because you are using the first mode, but if I want to override or decorate something, you are forcing me to use array notation.
I would think about our own prefix like:
ss
(s from sahat and s from stallizer) or evenstl
(satellizer).ssOuath2
,stlOauth2
or something like that.What do you think?
The text was updated successfully, but these errors were encountered: