I\'m using ng-bootstrap as a substitute for ui-bootstrap in angular2.
My html is as follows:
-
Usually this error occurs when we are trying to implement both Interpolation and Property data binding on the same html property.
Example:
Wrong implementation
[disabled]= {{isDisabled}}
Correct implementation
disabled= {{isDisabled}}
Note: remove the square bracket from the html element property
Use this
<button class="btn btn-primary" title="Edit" (click)="showEditModal(record.id)"><i class="fa fa-edit"></i></button>
If you want pass only $index value
[attr.aria-labelledby]=" ' ' + $index"
You can't use interpolation inside standard property binding. There should be an expression.
Seems it should be:
[attr.aria-labelledby]="'desiredSkill' + $index"
or
attr.aria-labelledby="desiredSkill{{$index}}"
I think you forgot to declare index
of ngFor
*ngFor="let item of ['Elastic Search','Database Theory','CVS'];let $index=index" ...
also use,
[attr.aria-labelledby]="desiredSkill{{$index}}"
In link tags use like this
Use this
<a class="custom-badge status-blue" [routerLink]="'/hospital/doctorleave/'+item.Id]">Manage Leave</a>
Instead of
<a class="custom-badge status-blue" [routerLink]="'/hospital/doctorleave/{{item.Id}}']">Manage Leave</a>