import { Injectable, EventEmitter } from '@angular/core'; import { Notification } from '../_models/notification.class'; import { Subject } from 'rxjs/Subject'; import { Observable } from 'rxjs/Observable'; @Injectable({ providedIn: 'root' }) export class LivePreviewService { private subject = new Subject(); constructor() { } update(html) { //this.subject.next(html); localStorage.setItem('liveP', html); } getLivePreview() { return localStorage.getItem('liveP'); } }