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

Breadcrumb disappeared in deployed Demo App on Refresh #1

Closed
ani006 opened this issue Jul 5, 2019 · 15 comments
Closed

Breadcrumb disappeared in deployed Demo App on Refresh #1

ani006 opened this issue Jul 5, 2019 · 15 comments
Assignees
Labels
bug Something isn't working

Comments

@ani006
Copy link

ani006 commented Jul 5, 2019

On refresh breadcrumb gets disappeared!!

@udayvunnam
Copy link
Owner

Can you please elaborate. Does it get disappered or not shown with dynamic updated values

@ani006
Copy link
Author

ani006 commented Jul 5, 2019

Can you please elaborate. Does it get disappered or not shown with dynamic updated values

First time it's load fine but but as soon as hit refresh it gets disappeared!! For every routes not only dynamic updated values

@udayvunnam
Copy link
Owner

If you play around https://xng-breadcrumb.netlify.com, it shows breadcrumb even on page refresh. Can you provide a stackblitz to see the issue.

@ani006
Copy link
Author

ani006 commented Jul 5, 2019

If you play around https://xng-breadcrumb.netlify.com, it shows breadcrumb even on page refresh. Can you provide a stackblitz to see the issue.

if i do refresh with this url https://xng-breadcrumb.netlify.com it is giving me error.
"Looks like you've followed a broken link or entered a URL that doesn't exist on this site."

@udayvunnam
Copy link
Owner

Okay I got that! the problem is with netlify redirects (deployed env), but not the library behaviour itself. Thanks for reporting. I will fix the deployment.

@udayvunnam
Copy link
Owner

@ani006 Irrespective of this, the library should work with your project even with refresh. Please let me know otherwise.

@udayvunnam
Copy link
Owner

@ani006 I have fixed the issue in deployment https://xng-breadcrumb.netlify.com. You should see that working on page refresh as well. cheers!

Please close the issue if this works:)

@udayvunnam udayvunnam self-assigned this Jul 6, 2019
@udayvunnam udayvunnam added the bug Something isn't working label Jul 6, 2019
@ani006
Copy link
Author

ani006 commented Jul 6, 2019

One

@ani006 I have fixed the issue in deployment https://xng-breadcrumb.netlify.com. You should see that working on page refresh as well. cheers!

Please close the issue if this works:)

One more thing i observed in my project that if i don't add breadcrumb for any particular router then also it showing the URL as breadcrumb. Can you tell why ?

@udayvunnam udayvunnam changed the title Broken Breadcrumb disappeared in deployed Demo App on Refresh Jul 6, 2019
@udayvunnam
Copy link
Owner

udayvunnam commented Jul 6, 2019

One

@ani006 I have fixed the issue in deployment https://xng-breadcrumb.netlify.com. You should see that working on page refresh as well. cheers!
Please close the issue if this works:)

One more thing i observed in my project that if i don't add breadcrumb for any particular router then also it showing the URL as breadcrumb. Can you tell why ?

As per the current design, breadcrumbs(same as route) will be shown even if there is no breadcrumbs defined. Please go through README

You have to explicitly define not to show breadcrumbs, by one of the below ways -

 {
      path: 'edit',
      component: MenteeEditComponent,
      data: { breadcrumbAlias: 'menteeEdit' }
    }
//-----------------------ALTERNATIVE------------------------
// use BreadcrumbService skip() or skipForAlias() methods
constructor(private breadcrumbService: BreadcrumbService) {}
this.breadcrumbService.skipForAlias('aliasName');

//-----------------------ALTERNATIVE------------------------

constructor(private breadcrumbService: BreadcrumbService) {}
this.breadcrumbService.skip('path/:param/toBeSkippedBreadcrumbRoute');

check this url - https://xng-breadcrumb.netlify.com/mentee/7/edit

I understand, this is not the desired behaviour always. I will make this behaviour optional with next minor release

@ani006
Copy link
Author

ani006 commented Jul 6, 2019

@ani006 Irrespective of this, the library should work with your project even with refresh. Please let me know otherwise.

Brother it's still doesn't work on refresh what could be the problem in my project ??
Please help me out

@udayvunnam
Copy link
Owner

@ani006 Irrespective of this, the library should work with your project even with refresh. Please let me know otherwise.

Brother it's still doesn't work on refresh what could be the problem in my project ??
Please help me out

Here is a minimal stackblitz example that works on refresh as well - https://stackblitz.com/edit/xng-breadcrumb.
Please create an example with your code or show me the code if it's open source

@udayvunnam udayvunnam reopened this Jul 7, 2019
@udayvunnam
Copy link
Owner

udayvunnam commented Jul 17, 2019

@ani006 You can now disable the default behavior of showing breadcrumbs

Disabling default mapping of route to breadcrumb label:
To avoid breadcrumb labels showing by default even for routes that don't have breadcrumb configuration set defaultMapping=false.


released with version 1.2.0

@ani006
Copy link
Author

ani006 commented Jul 18, 2019

Alright brother !!
It's working fine now..
Thanks ....

@sagar1987
Copy link

sagar1987 commented Oct 25, 2019

@udayvunnam Hi Uday thanks for the reply , I am using version "xng-breadcrumb": "^2.1.0" ,As i am using angular 7 , Please let me know how can i resolve this issue . Thanks in advance

@udayvunnam
Copy link
Owner

Discussion resolved in #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants