0

In my case routing data are available in Database. So i need to take the value from Database and create routing dynamically at run time. I didn't find any option to load a route data before route init or pause the application until route data load.

Please suggest me a idea

Aravind Sivam
  • 1,089
  • 8
  • 23

1 Answers1

0

If your routes are not complex:

You can define routes with 'variables':

RouterModule.forRoot([
  { path: 'news/:id', component: MyComponent },
])

The official documentation about the Router is available here

Ploppy
  • 14,810
  • 6
  • 41
  • 58