I'm using Scully to generate static pages for my dynamic routes. See my configuration below:
export const config: ScullyConfig = {
projectRoot: './src',
projectName: 'myNgProject',
outDir: './dist/static',
routes: {
'/product/:permalink': {
type: 'json',
permalink: {
url: 'https://api.my-ng-project.com/products',
property: 'permalink',
resultsHandler: (data:any) => {
let products = data.map(data, (x:any) => {
return { 'permalink' : x.permalink }
})
return products
},
},
},
},
Here's an excerpt of my route config:
const routes: Routes = [
{
path: '', component: MainLayoutComponent, children: [
{ path: '', component: IndexComponent },
{ path: 'login', component: LoginComponent },
{ path: 'profile', component: ProfileComponent },
{ path: 'orders', component: OrdersComponent },
{ path: 'product/:permalink', component: ProductComponent },
]
}
]
Scully is working on non-dynamic routes but fails on /product/:permalink routes. See error below:
Not sure what I am missing here but it looks like Scully is trying to literally create a folder named product/:permalink instead of product/product1, etc.
Anybody knows how to solve this?
