Is it not possible to have the template of the pages in a .html file? #1127
-
I have seen several examples and they all have the template within the same component .ts file, and not in a .html file. I wonder if it is not compatible with the file-based router, if it is really compatible, an example of how it should be? I prefer to have my template and my code separately. |
Beta Was this translation helpful? Give feedback.
Answered by
brandonroberts
May 30, 2024
Replies: 2 comments 3 replies
-
I think you can do this
Then in LoginComponent, you can have |
Beta Was this translation helpful? Give feedback.
1 reply
-
External styles and templates are definitely supported also |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, you can nest the files inside the folder.
Nested layouts do need a
.page.ts
file alongside the folder thoughAlso, yes, you can colocate non-page TypeScript files next to the page files