Created
February 9, 2019 19:46
-
-
Save lydemann/5e9c468ff80a0fdff48c47996605235f to your computer and use it in GitHub Desktop.
hardcoded-questions.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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