Created
November 5, 2018 16:31
-
-
Save vsavkin/cad2d25eaba08773343d1e831d830410 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
@Component({ | |
template: ` | |
<div #dynamic></div> | |
` | |
}) | |
class DynamicContentCompoent { | |
@ViewChild('#dynamic') el: ElementRef; | |
constructor(private loader: CmsTemplateLoader) {} | |
afterViewInit() { | |
this.el.nativeElement.innerHtml = sanitize(this.loader.loadDynamicTemplate()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment