What I want to do is following in but in a new Tab or new Window:
$state.go(\'studentsReport\', {
type: $scope.report.type, // string
selectedStude
use ng-click on link tag and call a function. in function put your parameters in LocalStorage. then in app.run use $rootScope.$on("$stateChangeStart") and check if localstorage have parameters get params and call $state with params.
//in page controller:
var openNewTab = function () {
localStorage.newTab = JSON.stringify({
state: "yourState",
params: {
param1: "someparam1",
param2:"someparam2"
}
});
window.open(document.location.origin);
}
//angular app run config:
angularApp.run(function($state){
if(localStorage.newTab){
var newTab = JSON.parse(localStorage.newTab);
localStorage.removeItem("newTab");
$state.go(newTab.state, newTab.params);
event.preventDefault();
}
})
open new tab