How do I get the contents of my current component?
Say I have FooComponent
that's used in another component, like so:
<foo>bar</foo>
How do I extract bar
in FooComponent
?
Tried this, but got val = null
:
ngAfterViewInit() {
console.info('val =', this.elementRef.nativeElement.value);
}