Angularjs 'ng-href' not working

I am trying to create a link to each identifier using angularjs ng-href, but when I refresh the page, the links do not appear. I even closed the browser and cleared the cache, but nothing happens. Here is my current code:

<tr ng-repeat="parcel in parcels"> <td><a ng-href="http://www.proj.com/{{ parcel.id }}/edit/"/>{{ parcel. id }}</td> <td>{{ parcel.tracking_id }}</td> <td>{{ parcel.shipper_ref_no }}</td> 

 $scope.parcels = []; $scope.scans = []; $scope.missings = []; $scope.excludeds = []; $scope.parcels = Outbound.summaryPageData.parcels; $scope.scans = Outbound.summaryPageData.scans; $scope.missings = Outbound.summaryPageData.missings; $scope.excludeds = Outbound.summaryPageData.excludeds; }); 
+2
javascript angularjs
source share
1 answer

I think this is a simple HTML syntax error - the <a> tag has no content. Try changing this:

 <a ng-href="http://www.proj.com/{{ parcel.id }}/edit/"/>{{ parcel.id }} 

to:

 <a ng-href="http://www.proj.com/{{ parcel.id }}/edit/">{{ parcel.id }}</a> 
+7
source share

All Articles