This problem is similar to Angular uiRouter open state in new window or tab with stateParams, but the only answer does not seem to work.
I'm displaying a grid where users can select up to 1000 rows. There's a print button which is supposed to open a new tab in the browser with these rows in a printable format.
In my controller, I'm setting these rows (articles) in a service, then I open the new window:
articlesService.setArticles(selected);
$window.open($state.href('newwindow', {}, {absolute: true}), '_blank');
This does open the new tab, however, the data in my service is lost. I'm really supposed to use a new tab. I was thinking about storing the data in a cookie, but as I could have more than 1000 rows, that's not really an option. I'm also not passing anything in the url, as the user can select whatever he wants.
Is there any way to achieve this functionality?