Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/angular.jsPublic archive

Escaped "short" word and added ability to stop updatingRoute in beforeUpdateRoute#577

Closed
bartes wants to merge6 commits intoangular:masterfrombartes:master

Conversation

bartes
Copy link

No description provided.

@vojtajina
Copy link
Contributor

Closing this PR. We are that we want api for canceling the route change, but it's not that simple (we need to revert the $location), so here is an issue for that:#592

@bartes
Copy link
Author

Currently in our project we are reverting location url in more less this way

this.$on("$beforeRouteChange", function(scope, next, current, stopCallback) {
if (!current){
self.lastUrl = $location.url();
return;
}

if (next && userWantToGo()){  self.lastUrl = null;} else {  stopCallback();  $location.url(self.lastUrl);}

});

It could be integrated inside $route service.

@vojtajina
Copy link
Contributor

yep, the problem is, when route change is induced by outside change (browser's url change) - e.g. user has typed into address bar or clicked on link (in hashbang $location mode)...

We have to consider these cases as well...

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@bartes@vojtajina@IgorMinar

[8]ページ先頭

©2009-2025 Movatter.jp