I having problems trying to open a state in a new browser tab. It should resolve the async call to populate the data when it opens in the new browser tab. Is this possible to do with angularjs ui router?
Here's my ui router settings:
.state('snapshots.user_detail', {
url: "/user/detail/{userID:[0-9]+}",
templateUrl: function($stateParams) {
return "user/detail/" + $stateParams.userID;
},
controller: "userDetailCtrl as userDetailCtrl",
resolve: {
async: ['userService', '$stateParams',
function(userService, $stateParams) {
alert("running detail ctrl async");
return userService.getUser($stateParams.userID);
}
]
}
})
userDetailCtrl:
function userDetailCtrl($scope, async) {
"use strict";
var self = this;
self.user = async;
}