Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multiple routing files #9

Closed
Hesesses opened this issue Aug 15, 2019 · 7 comments
Closed

multiple routing files #9

Hesesses opened this issue Aug 15, 2019 · 7 comments
Assignees
Labels
Test code change deployed. ready for verification.

Comments

@Hesesses
Copy link

Hello,

I have layout-routing.module.ts which has:

const routes: Routes = [
  {
    path: '', component: LayoutComponent, data: {breadcrumb: 'my app name'}, children: [
      {path: 'home', loadChildren: '../home/home.module#HomeModule'},
      {path: 'users', loadChildren: '../users/users.module#UsersModule'},
      {path: 'login', loadChildren: '../login/login.module#LoginModule'},
      { path: '**', redirectTo: '/home', }
    ],
  },
];

and then users-routing.module.ts

const routes: Routes = [
  {path: '', pathMatch: 'full', component: UsersComponent, data: {breadcrumb: 'Users'}},
  {path: 'add', component: AddUserComponent, data: { breadcrumb: 'Add new'}},
  { path: ':userId', data: {breadcrumbAlias: 'userFullname'}, children: [
      {path: '', component: ShowUserComponent},
      {path: 'edit', component: EditUserComponent, data: {breadcrumb: 'edit'}}
    ]}
];

What I would like to have is to have my app name always first part of the breadcrumb, is this possible this way?

@udayvunnam
Copy link
Owner

This should work. Do you see it not working @Hesesses?

@Hesesses
Copy link
Author

Yes, for me it shows users / add new for example instead of app name / users / add new

@udayvunnam udayvunnam self-assigned this Aug 17, 2019
@udayvunnam udayvunnam added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 17, 2019
@udayvunnam udayvunnam added this to To do in xng-breadcrumb via automation Aug 17, 2019
@Hesesses
Copy link
Author

Hesesses commented Sep 4, 2019

Any updates on this? 🙏

@udayvunnam
Copy link
Owner

@Hesesses I will look into it, this weekend.

@udayvunnam
Copy link
Owner

@udayvunnam
Copy link
Owner

udayvunnam commented Sep 8, 2019

I have tested your use case and also added a demo and it seems to work. please check https://github.com/udayvunnam/xng-breadcrumb/blob/demo/projects/demo/src/app/app-routing.module.ts

@udayvunnam
Copy link
Owner

if you still face any issue please provide a https://stackblitz.com with example

@udayvunnam udayvunnam added Test code change deployed. ready for verification. and removed good first issue Good for newcomers help wanted Extra attention is needed labels Sep 8, 2019
@udayvunnam udayvunnam moved this from To do to Done in xng-breadcrumb Sep 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Test code change deployed. ready for verification.
Projects
Development

No branches or pull requests

2 participants