如何将以下url.action链接转换为引导按钮。
<a data-ng-href="@Url.Action("Create", "Profile")" target="_self">Create New </a>**strong text**
单击此按钮后,需要将当前页面重定向到“创建动作和配置文件控制器”。
我正在尝试引导和分解遗留的asp.net mvc 4应用程序。
谢谢
您可以为锚标记提供一类按钮,使其看起来像一个按钮,但仍可以包含href。备选方案是在控制器中具有使用角度$ location服务更改路径的功能,例如:
$scope.setLocation = function(url) {
$location.path(url)
};
在html中:
<div class="button" ng-click="setLocation('path/to/location');
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句