如何使用angularjs指令使用路由制作HTML.ActionLink

时间:2016-09-16 19:09:48

标签: angularjs asp.net-mvc

我有HTML.ActionLink可以很好地工作,没有像下面的angularjs:@Html.ActionLink(@itemlist.ATitle, @itemlist.ActionName, @itemlist.ControllerName, new { Area = @itemlist.AreaName }, @itemlist.AttributeName)

但我包括angularjs ng-repeat和从$ scope获取数据并尝试使用HTML.ActionLink指令/插值。这是使用来自对象的控制器,动作,区域,显示和属性属性,但是当与ng-repeat一起使用时,它不会形成可路由的链接。我搜索谷歌,得到以下代码,但它不符合我的要求。 <a href="@Url.Action("{{report.ATitle}}", "{{report.ActionName}}", "{{report.ControllerName}}")/ {{report.AreaName}}" target="_self">Index</a> and below one also <a data-ng-href="@Url.Action("Edit", "Home")/{{row.Id}}" target="_self">Edit </a>

0 个答案:

没有答案