import { Component, TemplateRef, ViewChild, AfterViewInit, ViewEncapsulation } from '@angular/core'; import {BmTourService} from "../services/bm-tour.service"; import {TourStepTemplateService} from "../services/tour-step-template.service"; @Component({ encapsulation: ViewEncapsulation.None, selector: 'tour-step-template', styles: ['body { max-height: 100vh; }'], template: ` `, }) export class TourStepTemplateComponent implements AfterViewInit { @ViewChild('tourStep', { read: TemplateRef }) public tourStepTemplate: TemplateRef; step : any; constructor(public tourStepTemplateService : TourStepTemplateService,public tourService : BmTourService) {} public ngAfterViewInit(): void { this.tourStepTemplateService.template = this.tourStepTemplate; } }