Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

Split RouteConfig from app.component #127

Open
DylanMeeus opened this issue Jun 1, 2016 · 4 comments
Open

Split RouteConfig from app.component #127

DylanMeeus opened this issue Jun 1, 2016 · 4 comments

Comments

@DylanMeeus
Copy link
Contributor

DylanMeeus commented Jun 1, 2016

I came across this SO post and I believe that it makes sense to put our RouteConfig in a separate file, rather than also adding them to app.component

@ghost
Copy link

ghost commented Jun 1, 2016

This may be a good idea for app.component, but then would it be done for the child routes as well? If we seperate app.component routes into a seperate route file then we should do the same for the child component routes. For this I think it makes less sense and would require additional folder/file structure to accommodate.

@DylanMeeus
Copy link
Contributor Author

The way in which we have used child routes now is okay I think. The item component is quite small (surely compared to app.component), and splitting it off for just two routes might be a overkill.

To me, it seems like app.component is already quite a large file. We are also going in against some style guidelines from angular2 about how to structure the components as it is.

(Do extract templates and styles into a separate file, when more than 3 lines)

It is quite a big template, and we are adding a routeconfig and typescript in the same file.

Keeping in mind that our RouteConfig is likely going to grow some more, it might be best to at least split this one.

@ghost
Copy link

ghost commented Jun 1, 2016

Sounds good to me. We still have the issue of extracting templates into html files.

@DylanMeeus
Copy link
Contributor Author

We do indeed @wwelling . I'm not sure what the idea is going forward, keep it as we have it now, or split them in component.ts and component.html files?

@ghost ghost changed the title split RouteConfig from app Split RouteConfig from app Jun 6, 2016
@ghost ghost changed the title Split RouteConfig from app Split RouteConfig from app.component Jun 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant