I am a beginner in AngularJS and I'm having some issues using the ng-href.
I have an array containing dictionaries.
$scope.options = [{title: 'option1', path:'optionPage'}, ... ];
In the HTML code, I make use of ng-repeat
within a <table></table>
to display options; each row being a link. Below is the code.
<table class="table">
<tr ng-repeat="option in options">
<td><a href="#optionPage">{{option.title}}</a></td> <!-- This works -->
<td><a ng-href="#{{option.path}}">{{option.title}}</a></td> <!-- This does not work!! -->
</tr>
</table>
Using the a href
and directly providing the link works. (I am making use of the $route), but ng-href
doesn't work. Could somebody please point out the issue here.