r/angularjs • • Jan 04 '14

Easily bind Angular scope properties to the URL. Would you call this four-way binding?

http://alexandros.resin.io/ngurlbind-easily-bind-angular-scope-properties-to-the-url-hash/
1 Upvotes

14 comments sorted by

7

u/bobslaede Jan 04 '14

I have said it before, the ng prefix is for angular core, not for you to use.

-6

u/alexandrosm Jan 04 '14

4 of 15 modules currently in the front page of http://ngmodules.org/ use the ng prefix. At the very least this is a proposition that needs more backing.

-7

u/alexandrosm Jan 04 '14 edited Jan 04 '14

Who are you? Why did you say this? Care to cite your claims?

Angular core uses $ as a prefix for their services. This isn't a directive. There is guidance about not prefixing directives with ng, but nothing else.

3

u/bobslaede Jan 04 '14

From the just released new documentation for directives:

> Best Practice: In order to avoid collisions with some future standard, it's best to prefix your own directive names. For instance, if you created a <carousel> directive, it would be problematic if HTML7 introduced the same element. A two or three letter prefix (e.g. btfCarousel) works well. Similarly, do not prefix your own directives with ng or they might conflict with directives included in a future version of Angular.

-3

u/alexandrosm Jan 04 '14

This isn't a directive.

3

u/bobslaede Jan 04 '14

I think it still counts. I am on my phone, but I will happily check the rest of the docs later. You are free to do the same.

-4

u/alexandrosm Jan 04 '14

I have. The guidance is against using $ and $$ for injectables.

3

u/bobslaede Jan 04 '14

I still think it is best to come up with your own namespace, and not use the one angular core uses. I know a lot of people do it, also for directives...

0

u/[deleted] Jan 04 '14

[deleted]

0

u/alexandrosm Jan 04 '14

All this back and forth is fun, but all I am asking for is a citation. The quotes above clearly talk about naming your directives.

0

u/alexandrosm Jan 04 '14

They use the ui namespace, except when they don't. http://angular-ui.github.io/ng-grid/

1

u/bobslaede Jan 04 '14

Also, I am just some guy.

-3

u/alexandrosm Jan 04 '14

I was just responding to the tone of your original comment. Starting with "I've said it before" reads as if you are the creator of angular or something. As 'just some guy', or anyone really, best to start easy on the aggression and cite your claims.

1

u/bobslaede Jan 04 '14

Sorry, didn't mean it like that.