Hi there,

i am just stuck with another problem: Binding data to div-attributes that 
are not provided through Angular2...

What i am going to do:

<button *ngFor="#slide of slides; #i = index" [ngClass]="{'is-active': i == 
0}" data-slide="i"></button>


So i tried multiple syntax:

1:
Syntax: As shown above
Result: Template is rendered, but the attribute "data-slide" contains the 
letter "i"

2:
Syntax:
<button *ngFor="#slide of slides; #i = index" [ngClass]="{'is-active': i == 
0}" data-slide="{{i}}"></button>
Result: EXCEPTION: Template parse errors: Can't bind to 'slide' since it 
isn't a known native property [...]

3:
Syntax: 
<button *ngFor="#slide of slides; #i = index" [ngClass]="{'is-active': i == 
0}" [data-slide]="i"></button>
Result: EXCEPTION: Template parse errors: Can't bind to 'data-slide' since 
it isn't a known native property

4:
Syntax: 
<button *ngFor="#slide of slides; #i = index" [ngClass]="{'is-active': i == 
0}" [dataSlide]="i"></button>
Result: EXCEPTION: Template parse errors: Can't bind to 'dataSlide' since 
it isn't a known native property


The data-slide is an attribute required by the CSS framework Zurb 
Foundation (6) and the attribute is not being served by Angular2. So is 
there any possibility to pass the current value of "i" (numeric, beginning 
with 0) to the mentioned attribute?


Thanks in advance,

Julian

-- 
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 https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to