Rijwandeltax
Rijwandeltax

Reputation: 152

How to use ng-href in ionic?

I got some error when I use ng-href in hyper link ..

Can't bind to 'ng-href' since it isn't a known property of 'a'

<ion-content class="bg" >
<div *ngFor="let deltaa of delta">
    <ion-list> 
      <div [innerHTML] = "'<p>' + 'deltaa.GoogleMap' + '</p>'"></div> 
      <a ng-href="{{deltaa.MobileNumber}}" style="color:#f3d303">{{deltaa.MobileNumber}}</a>
    </ion-list>
    </div>
</ion-content>

Upvotes: 0

Views: 1139

Answers (1)

Vincent Aige
Vincent Aige

Reputation: 61

ng-href is an AngularJs tag. In Angular (v2+) should be:

<a [href]="deltaa.MobileNumber" style="color:#f3d303">{{deltaa.MobileNumber}}</a>

Upvotes: 2

Related Questions