Skip to content

Instantly share code, notes, and snippets.

@lydemann
Created February 9, 2019 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lydemann/5e9c468ff80a0fdff48c47996605235f to your computer and use it in GitHub Desktop.
Save lydemann/5e9c468ff80a0fdff48c47996605235f to your computer and use it in GitHub Desktop.
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