but...
ng:disabled="{{expression}}"
Is this seeming inconsistency something that is being cleaned up for
1.0, or is there a logical reason for the difference?
Thank You,
Daniel
Hello Vojta,
I don't understand this reasoning. Is it a technical limitation or an
intentional design decision? If it is a design decision, then I would
think that all ng:xxx should be bound in the same way. I don't think
of ng:disabled as a replacement directive and ng:class as a pure
AngularJS directive. If they were consistent, I would learn the
AngularJS way, but as it is now, I have to look up each one to find
out which way to bind it, and it looks haphazard in the HTML to see
some ng: directives with {{ }} and some without. It makes it unclear,
at a glance, to see mistakes in the code.
Just my 2¢.
Thank You,
Daniel
--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To post to this group, send email to ang...@googlegroups.com.
To unsubscribe from this group, send email to angular+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/angular?hl=en.
The ng:src example clearly indicates that the {{ }} should be present
in that case. But are there any other cases like it? If not, then it
could be the lone exception, which would be easy to grasp because of
the special use case.
I don't quite follow what you are saying about ng:disabled. I thought
you were saying that ng:disabled doesn't need the {{ }}, but
ng:disabled is one of the directives that does need {{ }}.
I wonder if the AngularJS team is looking at it as "these are real
HTML attributes that we are overriding" (and therefore should have {{
}}) vs. "these are solely AngularJS attributes" (which shouldn't have
{{ }}). In my mind, everything with ng: is an AngularJS attribute and
should behave the same insofar as they don't create ugliness (such as
in the ng:src=" '/img/' + username + '.jpg' " example you gave).
Best,
Daniel
Of course you might have this split up into two separate attributes
and then you wouldn't need the {{ so that might be a bad example in
the end..