Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
hardcoded-questions.component.ts
import {
AfterViewInit,
Component,
TemplateRef,
ViewChild
} from '@angular/core';
import { HardcodedQuestionService as HardcodedQuestionsService } from './hardcoded-questions.service';
@Component({
selector: 'app-hardcoded-questions',
templateUrl: './hardcoded-questions.component.html',
styleUrls: ['./hardcoded-questions.component.scss']
})
export class HardcodedQuestionsComponent implements AfterViewInit {
@ViewChild('questionToBeHardCoded') questionToBeHardCoded: TemplateRef<any>;
constructor(
private hardcodedQuestionsMapService: HardcodedQuestionsService
) {}
ngAfterViewInit(): void {
this.hardcodedQuestionsMapService.hardcodedQuestionsMap.set(
'questionToBeHardCoded',
this.questionToBeHardCoded
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.