You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you have a decorator input that has a template name that aliases the decorator's attribute selector, the demo code rendered is incorrect, because the selector is rendered as-is (without square brackets or value), and then the input is rendered too, in square brackets, but with the input name rather than the template name.
This can be seen with the Playground > Decorators example for the NgDocRotatorDirective.
@Directive({selector: '[ngDocRotator]',standalone: true,})exportclassNgDocRotatorDirectiveimplementsOnChanges,OnInit{/** Rotator state */
@Input('ngDocRotator')rotated: boolean=false;
Expected template when ngDocRotator is checked in the playground pane:
Additionally, it appears that if you put your component/directive attribute in square brackets in your playground template already, to demo a non-default value, the template parser doesn't find it. Probably because it looks for the non-bracketed attribute.
The text was updated successfully, but these errors were encountered:
Is this a regression?
I don't know
Description
When you have a decorator input that has a template name that aliases the decorator's attribute selector, the demo code rendered is incorrect, because the selector is rendered as-is (without square brackets or value), and then the input is rendered too, in square brackets, but with the input name rather than the template name.
This can be seen with the Playground > Decorators example for the
NgDocRotatorDirective
.Expected template when
ngDocRotator
is checked in the playground pane:Actual:
This is incorrect, because the
rotated
input's template name was aliased tongDocRotator
.Note that if your input was defined as
then you'd get the
ngDocRotator
twice:Please provide the exception or error you saw
OS
Unix (Linux, macOS, etc.)
Browser
Chrome
Node version
N/A
Anything else?
Additionally, it appears that if you put your component/directive attribute in square brackets in your playground template already, to demo a non-default value, the template parser doesn't find it. Probably because it looks for the non-bracketed attribute.
The text was updated successfully, but these errors were encountered: