I have ASP.NET application where we use AngularJS. The issue is when we click "edit" the new view is openinig in the same window (tab). How to open it in new window (tab)? Here's the code:
List.html:
<td><a ng-click="editUser(u.ID)">edit</a></td>
AngularJS:
AdminUsersApp.controller("ListController", function ($scope, $location, $http, ErrorUI, Users, Cashdesks) {
...
$scope.editUser = function (id) {
$location.path("/edit/" + id);
};
window.open("/edit/" + id);window.open. What is `/edit/' + id; is it a URL to some different html?$location.pathjust returns the path of current page. instead you need the url which actually points to a different location, so when you call window s open function it should havewindow.open('example.com/admin/Admin_Users.aspx#/edit/id'). If you want to build the url dynamically use$location.host(),$location.protocol()etc to build a url and then append/edit/idat the end.