Hi guys,
This is a feature request. Perhaps this is the wrong forum to propose such
things.
My first post showed exactly what I want to do.
*<div ng-attr-{{obj.name <http://obj.name/>}}="{{obj.val}} />*
*<div ng-attr-{{obj.name <http://obj.name/>}} />*
*<{{obj.name <http://obj.name/>}} />*
I realized another use case is:
*<div {{obj.name <http://obj.name>}} />*
CSS cannot achieve the diversity of content and use of completely different
directives.
I will look for an alternate forum.
Thanks,
John
On Mon, Jun 29, 2015 at 10:24 AM, Alain Chautard <[email protected]>
wrote:
> "Custom look when my data has different values in it" => Then I would
> definitely implement that using CSS with conditional styles.
>
>
> On Saturday, June 27, 2015 at 5:23:36 PM UTC-7, John Grant wrote:
>>
>> I'd like to be able to do this:
>> *<div ng-attr-{{obj.name <http://obj.name>}}="{{obj.val}} />*
>>
>> as well as
>> *<div ng-attr-{{obj.name <http://obj.name>}} />*
>>
>> and possibly even this:
>> *<{{obj.name <http://obj.name>}} />*
>>
>>
>> My understanding is that this is not currently possible. I'm using
>> v1.3.16.
>>
>> A common pattern for me is to leverage directives, and to use different
>> directives to create a custom look when my data has different values in it.
>> I am currently writing giant ng-switch permutations to use the desired
>> directive. I want to specify the name of the directive with my data.
>>
>> Since 'ng-attr-cx' can be used to produce the 'cx' dom attribute, I feel
>> like this is within reach.
>>
>> Thanks for any help understanding the issues.
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "AngularJS" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/angular/rNmI6CxEyUI/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/angular.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.