Issue
What's wrong with the following code? Hapenned to me when I tried to assign an expression to an element,
<div class="progress-bar progress-bar-striped active" role="progressbar"
aria-valuenow="{{MY_PREC}}" aria-valuemin="0" aria-valuemax="100" >
{{MY_PREC}}
</div>
also tried as
[aria-valuenow]={{MY_PREC}}
Seem like it happens since RC5
any ideas?
Solution
Angular2 binding is property binding by default. There is no aria-valuenow
property on div
if there is no directive or component applied that has such an @Input()
Use instead explicit attribute binding
attr.aria-valuenow="{{MY_PREC}}"
or
[attr.aria-valuenow]="MY_PREC"
Answered By - Günter Zöchbauer
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.