Skip to content

Is it not possible to have the template of the pages in a .html file? #1127

Answered by brandonroberts
sawa-ko asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, you can nest the files inside the folder.

- index.page.ts
- about
  - loader.ts
  - index.page.ts <-- /about
  - template.html (Optional if the component.ts file already has it in its options.)
  - style.css (Optional if the component.ts file already has it in its options.)

Nested layouts do need a .page.ts file alongside the folder though

- index.page.ts
- parent <-- layout folder
  - child
    - index.page.ts <-- /parent/child
- parent.page.ts <-- router-outlet

Also, yes, you can colocate non-page TypeScript files next to the page files

src/
└── app/
    └── pages/
        └── (auth)/
            ├── login.page.ts
            ├── signup.page.ts
            └── components (folder …

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@sawa-ko
Comment options

Comment options

You must be logged in to vote
2 replies
@sawa-ko
Comment options

@brandonroberts
Comment options

Answer selected by sawa-ko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants