ng-click
无法正常工作。
即使单击NewsLetter2
,也会警告其显示newsletter
。我希望看到newsletter2
<table class="table">
<tr>
<td>
<span class="glyphicon glyphicon-file text-info"></span>
<a ng-click="ShowYouthandYoungContent('Newsletters')">Newsletters</a>
</td>
</tr>
<tr>
<td>
<span class="glyphicon glyphicon-file text-info"></span>
<a ng-click="ShowYouthandYoungContent('Newsletters2')">Newsletters 2</a>
</td>
</tr>
</table>
下面是JS,我有什么想念的吗
$scope.ShowYouthandYoungContent = function(link) {
if (link === "Newsletters") {
alert("Newsletters")
} else if (link === "Newsletters2") {
alert("Newsletters2");
}
}