Angular v8 has just been released. Although it's mostly backward compatible, there's some Breaking Changes.
According to Angular's Changelog one core change is (and I quote):
"In Angular version 8, it's required that all @ViewChild and @ContentChild queries have a 'static' flag specifying whether the query is 'static' or 'dynamic'."
It's also state that in most cases just setting { static: false }
will do the trick.
@ViewChild('selectorName', { static: false }) varName: any;
My question is when should I set this attribute (static) to be true
? and how will it effect my application???
@ContentChild
the non-static is available inngAfterContentInit
– Roxie