Comments (7)
Thanks for your answer! Unfortunately, :id.ts
is an invalid filename in Windows
from ngext.
Oh no! Sorry about that, I had no idea, as I'm on Ubuntu.
Okay, I'll change it from :
to the _
character, like this:
Page File Route (Generated)
~/pages/user/_id.ts -> /folder/:id
Thanks for reporting the issue, and let me know if there's anything else.
Cheers,
Ben
from ngext.
Dynamic routes now use _
in version 0.1.0
đ
from ngext.
Thanks for the quick fix!
How about nested parameterized routes such as:
/blog/:categoryId/:articleId
/catalog/:categoryId/:productId
/company/:customerId/offices/:officeId
Would it work with something like:
- company/
- _customer-id.ts
- _customer-id/
- offices/
- _office-id.ts
from ngext.
No worries! Yes that should work as expected. It will convert them for any amount of nested routes, like this:
Page File Route (Generated)
~/pages/company/_customer-id/office/_office-id.ts -> /company/:customer-id/office/:office-id
Then you can access those params in the ActivatedRoute
on the page component.
from ngext.
Hi @LayZeeDK,
Thanks for checking out the project! Yes, I need to work on the documentation a bit, but for now, this is what you're looking for:
parameterized page route
Simply putting a :
in front of the page component filename, signifies that it is a Parametrized route, which will give you the params in ActivatedRoute.params
Page File Route
~/pages/user/:id.ts -> /folder/:id
Let me know if there's anything else you need.
Cheers,
Ben
from ngext.
Leaving this as closed. Thank you for the support!
from ngext.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
đ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. đđđ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google â¤ī¸ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngext.