import { Injectable } from '@angular/core' ; import { Router } from '@angular/router' ; @ Injectable ( ) export class PreviewService { public content : Blob = null ; public name : string = null ; constructor ( private router ) { } showResource ( resourceId ) { this . router . navigate ( [ { outlets : { overlay : [ 'files' , resourceId , 'view' ] } } ] ) ; } showBlob ( name , content ) { this . name = name ; this . content = content ; this . router . navigate ( [ { outlets : { overlay : [ 'preview' , 'blob' ] } } ] ) ; } }