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

Bug when setting the title programmatically #20

Open
dabele91 opened this issue Nov 15, 2016 · 2 comments
Open

Bug when setting the title programmatically #20

dabele91 opened this issue Nov 15, 2016 · 2 comments

Comments

@dabele91
Copy link

If you're setting the title programmatically and you are clicking on the same route twice, the title is empty. On the first click, ngOnInit is called and the title is set. On the second click, the method isn't called again, and the ng2-meta plugin uses the title from the route (which is not definded, because i want to set the title programmatically).
Perhaps there should be a configuration flag (per route) for disabling the route titles.

@vinaygopinath
Copy link
Owner

Hey there, you can use disableUpdate in a route's meta config to disable setting the meta values for that route.

{
    path: 'home',
    component: HomeComponent,
    data: {
      meta: {
        disableUpdate: true
      }
    }
}

This is not documented in the README.md at the moment. Would you be up to edit the Options section and mention that this can be used to disable updates for a particular route?

@Asgaroth
Copy link

Just ran into the same problem with redirecting to self, we wanted to load a default when nothing was selected. then redirect to self with some more info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants