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
Been very much enjoying using this addon, thanks for creating this!
The documentation in the Readme only documents calling RouteTemplate in the function form. However, I've been using it as decorator and it's been working great. I wonder if this should be documented?
I like that it resembles a regular component definition greatly. The downside is that it doesn't work for template-only components, though. In this example it's just a simple template wrapped in the backing class, but that does trigger the ES Lint warning.
TypeScript
TypeScript works, but complains on the return type:
Decorator function return type 'TemplateFactory' is not assignable to type 'void | typeof IndexTemplate'.
Been very much enjoying using this addon, thanks for creating this!
The documentation in the Readme only documents calling
RouteTemplate
in the function form. However, I've been using it as decorator and it's been working great. I wonder if this should be documented?Decorator usage
Example:
I like that it resembles a regular component definition greatly. The downside is that it doesn't work for template-only components, though. In this example it's just a simple template wrapped in the backing class, but that does trigger the ES Lint warning.
TypeScript
TypeScript works, but complains on the return type:
A hacky patch can be achieved by just adding an override that returns
void
:Now TypeScript is happy 😄
The text was updated successfully, but these errors were encountered: