Комментарии:
Yeah, this required thing is stupid
ОтветитьThis was the first thing I noticed when I tried this required for the first time...
ОтветитьFor me, it totally makes sense. Even if you prove input in html template, this input could be from stream and first value from this stream could be undefined. You should check it anyway.
ОтветитьAlways felt hacky to use exclamation mark on inputs... I hope this gets fixed in coming RFCs.
ОтветитьIt's just sugar syntax and not really helping I think. Well we have good stuff anyway in latest releases, but thanks for pointing this out 👌
ОтветитьI was hoping that the required prop on the decorator would prevent the child component from rendering until all required inputs had been provided a value, not just bound. You can for instance bind a required input to an uninstantiated Subject via the async pipe, and you'll get a null value.
Ответить