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.
Replies: 2 comments 3 replies
-
I think you can do this
Then in LoginComponent, you can have |
Beta Was this translation helpful? Give feedback.
-
External styles and templates are definitely supported also Example: https://github.com/analogjs/analog/tree/beta/apps/analog-app/src/app/pages/shipping |
Beta Was this translation helpful? Give feedback.
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