-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feat] Investigate changing route component to a structural directive #37
Comments
Maybe it could even be a structural directive on the <ng-container *router>
<!-- For nested routes use exact: false -->
<route path="/blog" [exact]="false">
<app-blog></app-blog>
</route>
<route path="/posts/:postId">
<app-post></app-post>
</route>
<route path="/about">
<app-about></app-about>
</route>
<route path="/" redirectTo="/blog"> </route>
<route path="/" [exact]="false">
<app-page-not-found></app-page-not-found>
</route>
</ng-container> Not sure if this is possible. It would be a more complicated implementation, but it might be an easier developer experience to just apply one structural directive instead of one on each routed component. |
From the ease of development and readability, I would vote for current functionality, over structural directives for router and route. However, adding structural directives as an option would be great, unless we cripple the implementation by doing so. @LayZeeDK, @brandonroberts: what would be the use-case for using |
The default for custom elements is |
In short - DOM rendering performance. I thought there was some specific use case in mind. Thanks for the clarification. |
Currently we use a route component to define a route.
display: none
on the route elementThis effort would look at potential options to use a structural directive to register the route, and have the route component rendered in its place with no wrapper.
Thoughts
Reference: https://twitter.com/LayZeeDK/status/1285969664917614592?s=20
The text was updated successfully, but these errors were encountered: