Questions tagged [dynamic-routing]

89 questions
2
votes
1 answer

Dynamic Routing in BaseUrl in Asp.Net Core OData 4.0

I am currently developing an OData Api for a C# Asp.Net Core application. To stay in specifications of our API the URL needs to follow our multi-tenant architecture: https://website.com/api/tenants/{tenantId}/odata/ Since OData 4.0 has no…
2
votes
2 answers

React Router 4 Pass props to dynamic component

I have a list of doctors and I am trying to dynamically render a details page when selected. I see most people recommend to pass props through the Route component, something like this:
2
votes
1 answer

AngularJS Dynamically Load Controller and Template based on Route

I am trying to dynamically load BOTH a template and controller based on the route (in Angular 1.6), pulling from the current directory architecture. app |__login.module.js |__home.controller.js |__login.factory.js …
paulcruse3
  • 179
  • 2
  • 19
2
votes
0 answers

Error loading modules dynamically

In my Page/Page.js component, I am trying to dynamically load modules in REACT based on an array of modules called "modules". Currently I have all modules listed and I create components for each one in the modules array. import React from…
1
vote
1 answer

Error 'getStaticPaths can only be used with dynamic pages, not '/'' with Next JS

I want to use getStaticPaths for my posts blog with dynamic routes but I get an error while building. My folder with dynamic routes : pages/articles/[category]/[slug].js My Link Navigation:
1
vote
1 answer

How to resolve dynamic routes on client side in Next js framework

I am currently on Next js using full static generation, as I want to serve all my pages from the S3 + cloudfront (no server involved). Next js has good support for this except when it comes to dynamic pages (ex: /posts/:id). All the framework…
1
vote
0 answers

NextJS: After production if we reload the dynamic url redirecting to homepage

After uploading to server the dynamic routings are not working after reload of page, its redirecting to Homepage. In local its working fine
Mac D
  • 21
  • 3
1
vote
1 answer

getServerSideProps does not render dynamic pages in production, and show 404 error

I'm working with next.js, in development mode everything works fine, but in production mode I have a problem when rendering the pages dynamically. I have the following path inside the pages folder pages/user/[id], and this component is where I call…
1
vote
0 answers

Is it possible to build a Static SPA with Next.js that has dynamic routes?

I'm looking to build a static Next.js Single Page App that has dynamic routes, for example: /posts/123. I'd like to do this to: Be able to host the site anywhere (e.g. S3) Not need to know the routes at build time (so our APIs can change whenever…
Josh
  • 29
  • 2
1
vote
1 answer

nextjs nested dynamic folder routing

Update: Which it causing this error because of [category_slug]-index.js that getServerSideProps ?? i tried to do index.js under product folder, it work... mean it okies with [category_slug] which serverSideprops, am i right? This is my folder…
Wilker
  • 141
  • 8
1
vote
1 answer

Where am I going wrong with getStaticProps() and getStaticPaths()?

The Issue I cannot query the API by slug, it must be by id. An KeystoneJS headless CMS provide the data via API and my NextJS should use this data in a static generated Next.js app. Keystone API must be queried like this: All Posts:…
Anthony
  • 113
  • 7
1
vote
1 answer

How do I query my API for a single entity by its "slug" with GraphQL?

I am creating a Next.js blog that uses an API created with KeystoneJS. I am extremely confused by how I can get an individual post on a dynamic route from the post's slug. The Query This is how I thought the query should be: query Post($slug:…
Anthony
  • 113
  • 7
1
vote
1 answer

Can't seem to get dynamic filesystem based routing to work with Nuxt.js

Imagine the following endpoints: /categories/{id} /categories/{id}/sub-categories/{sub-id} The file system structure would be: categories sub-categories _subId.vue _id.vue Now the expectation is that if I hit: /categories/1 It…
Script47
  • 12,869
  • 4
  • 38
  • 59
1
vote
1 answer

How do I name page templates for nested dynamic routing in Next js

I'm trying to achieve a dynamic routing structure, using Prismic within my Next JS app. Essentially, I have a page, mysite.com/landing-page for example, that I'm able to route to within my [uid] template, using { uid } = params in my…
1
vote
2 answers

React-Redux: send a fetched API data from a component to a dynamic route component using a button inside a table

I'm building an app with react-redux and have 3 main problems. In a volenteer component, I get data of volenteers from the store and then show it in a table component by passing it the data and columns (imported as constants). The Volenteer…
Nathan Barel
  • 104
  • 1
  • 11