I am using service to pass data between components, but when I open a page in new tab like this:
<a [routerLink]="['/preview ']" target="_blank" class="btn">Preview</a>
then the app refreshes and data from service is lost; but if I omit target="_blank" then data is being passed to the components. But I need to open the other page on a new tab upon clicking, how can I do that without losing the passed data? My code is similar to this PLUNK. Thanks in advance.