I have div and I need to show it on a particular(mentioned below) path. Thanks in advance.
Path
{ path: 'preview/:questionid', component: QuestionPreviewComponent, outlet: 'questions' }
http://localhost:3000/admin/questions/(questions:preview/5cb18f686560a2f98b43f8e0)
Routing Module
imports: [RouterModule.forChild([
{ path: '', redirectTo: 'questions', pathMatch: 'full'},
{ path: 'questions', component: QuestionsComponent, children: [
{ path: '', component: QuestionListComponent, outlet: 'questions' },
{ path: 'bulk-upload', component: BulkUploadQuestionsComponent, outlet: 'questions' },
{ path: 'new', component: NewEditQuestionComponent, outlet: 'questions' },
{ path: 'edit/:id', component: NewEditQuestionComponent, outlet: 'questions' },
{ path: 'preview/:questionid', component: QuestionPreviewComponent, outlet: 'questions' }
]}
])],
See Question&Answers more detail:os