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

Make sure $state.href (and by extension uiSref) handle inherit: false #834

Merged
merged 10 commits into from
Jan 12, 2023

Conversation

oBusk
Copy link
Contributor

@oBusk oBusk commented Jan 11, 2023

Fixes #833

@wawyed
Copy link
Member

wawyed commented Jan 11, 2023

Needs this fix applied https://github.com/ui-router/angular-hybrid/pull/574/files

@oBusk
Copy link
Contributor Author

oBusk commented Jan 11, 2023

@wawyed should i copy that change to my fork?

@wawyed
Copy link
Member

wawyed commented Jan 11, 2023

Yes please

@oBusk
Copy link
Contributor Author

oBusk commented Jan 11, 2023

Pushed it @wawyed

@wawyed
Copy link
Member

wawyed commented Jan 11, 2023

@oBusk
Copy link
Contributor Author

oBusk commented Jan 11, 2023

@wawyed pushed 👍

@wawyed
Copy link
Member

wawyed commented Jan 11, 2023

hmm I wonder why is still failing.

@wawyed
Copy link
Member

wawyed commented Jan 11, 2023

Can you update the dependency @uirouter/publish-scripts to 2.6.0

@oBusk
Copy link
Contributor Author

oBusk commented Jan 11, 2023

Looks like it's still failing 😞

Looks like it's installing some local version of core but expecting the real version?

https://github.com/ui-router/core/actions/runs/3895405050/jobs/6650689255#step:5:311

@wawyed
Copy link
Member

wawyed commented Jan 11, 2023

Can you try adding to the ignore @uirouter/core ?

src/params/stateParams.ts Outdated Show resolved Hide resolved
@wawyed wawyed merged commit 12cd951 into ui-router:master Jan 12, 2023
@wawyed
Copy link
Member

wawyed commented Jan 12, 2023

Thank you

@oBusk oBusk deleted the href-inherit branch January 12, 2023 13:12
@oBusk
Copy link
Contributor Author

oBusk commented Jan 12, 2023

Do you have any idea if this is going to come out in a patch any time soon @wawyed?

@wawyed
Copy link
Member

wawyed commented Jan 12, 2023

New version has been released.

@Nirator78
Copy link

Hi @oBusk,
I have an AngularJS project to maintain, and I wanted to upgrade @uirouter/angularjs from version 1.0.30 to 1.1.0 and @uirouter/core from version 6.0.8 to 6.1.0. However, after this update, all ui-sref links no longer work. I understood that I need to set the inherit property to false. However, I don't know where to implement this without having to go through all my routes (is there a configuration available?).
Thank you in advance for your assistance.

@wawyed
Copy link
Member

wawyed commented Nov 27, 2023

I'm not entirely sure how this change breaks your implementation... The inherit false property gets added to the state declaration on the params object

@Nirator78
Copy link

Nirator78 commented Nov 28, 2023

Hi @oBusk ,
Thank for your answer, i will give you much information. I don't really know how the change can break my code, but every ui-serf directive doesn't work, I give you an extract of my code:
<a href ui-sref="app.menu">Menu</a>

And that the declaration of my route in AngularJS:

import template from "./pages/list/menu.html";
import { MenuController } from "./pages/list/menu.controller";

export const MenuRoutes = [
    "$stateProvider", ($stateProvider) => {
        $stateProvider
            .state('app.menu', {
                url: 'menu',
                template: template,
                controller: MenuController,
                controllerAs: 'vm',
                data: {
                    title: "Menu"
                }
            })
    }
];

If I write manually the route in the url it's working but not if I click on my button.

EDIT: The problem is not on the inherit, sorry for the disagreement.

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

Successfully merging this pull request may close these issues.

ParamDeclaration.inherit = false is ignored by $state.href()
3 participants