Angular-google-maps: Naming

Created on 22 Aug 2016  路  9Comments  路  Source: SebastianM/angular-google-maps

I don't know what the type of my issue. But I don't like the naming of components with the initials of the author's name. I appreciate the done work, but it simply strange

stale feature-request

All 9 comments

@dooddy do you have a proposal? (I know, naming is hard 馃槃 )

I thought about this too. Let's discuss the possibilities:

1) Someone suggested this:

<google-map>
  <google-map-marker></google-map-marker>
</google-map>

IMO that is not an option because I don't want to use the google namespace, as it is not a google project.

2) Use an agm prefix (that stands for angular(2) google maps.

<agm-map>
  <agm-marker></agm-marker>
</agm-map>

3) leave it as it is 馃槑

Guys, please vote (or propose another naming pattern) and leave your opinion below. Thanks!

@SebastianM, thanks for reply.
The second is better, IMHO.

Maybe something

<ng-map>
    <ng-map-marker></ng-map-marker>
</ng-map>

or something like in angular-ui/angular-google-maps

<ng-gmap>
    <ng-gmap-marker></ng-gmap-marker>
</ng-gmap>

What about ng2 instead of ng ? It seems to be more or less a convention followed by several projects already.

<ng2-gmap>
    <ng2-gmap-marker></ng2-gmap-marker>
</ng2-gmap>

@gnujeremie maybe you are right. But I think if you write project then you are using only one version of angular whether it's 1.* or 2.*

So adding '2' isn't so important

agm- seems like the most reasonable suggestion since the point of the prefix is to give sort of a namespace to components to avoid clashes (aside from the fact that HTML specification requires a hyphen in custom names).

Using ng- as a prefix doesn't make any sense IMO since that's just the name of he framework. _Of course_ it's an angular component, that's what you're writing in. Plus, if everyone used ng- as a prefix for their components, it's not much of a namespace, and clashes would occur very soon.

There's nothing wrong with sebm- as it is currently either, although it's difficult to remember and not obvious what it refers to. If the package was named "SebastianMaps" or something, that would be another story.

@lazarljubenovic is right, ng-/ng2- may not be a good idea finally, as the main goal of the prefix is to avoid namespace clashes.

@lazarljubenovic i'm agree with you. So maybe agm- is the best solution

@lazarljubenovic @dooddy

I agree with you. ng/ng2 is the namespace for Angular itself, so this is not a good idea. We will support the new prefix in the next release.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings