Open jstrachan opened 7 years ago
Don't really like it. Routes are matched top down AFAIK so how about just moving 'create'
route before ':id'
route?
though that means you can't use 'create' as an ID in your model right? Which isn't awesome
though it is a nicer URL :)
Personally totally happy to not have an ID of create/new - we should probably use numeric IDs anyway so that descriptive names are mutable.
thats fine for ipaas; but not for kubernetes/openshift/devex though - would be nice to have a convention that works for all models & apps
I added the Create page in the funktion fork of ipaas-client and found that it was easier in the code use the create page inside the same part of the navigation model as the list/view/edit pages. As a kinda hack I used the '-' token for the id https://github.com/jstrachan/ipaas-client/blob/funktion/src/app/functions/functions.module.ts#L27
which kept the code nice and simple:
though its a little bit of a hack adding the '-' token.
What do folks think? On the plus side the edit and create URIs are kinda similar - on the down side its a slight mis-use of the
:id
path ;)