Skip to content

Conversation

@jasonaden
Copy link
Contributor

@jasonaden jasonaden commented Oct 17, 2018

Fixes #24618

@mary-poppins
Copy link

Copy link
Contributor

@benlesh benlesh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one small change I'd make.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RxJS core team recommends using an Observer for all subscriptions that use more than one callback, like:

obs.subscribe({
  next(value) { },
  error(err) { }
});

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OOC, why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convention and more readable.

@mary-poppins
Copy link

@jasonaden jasonaden force-pushed the FW-153_url_returned_from_guards branch from a1f41fc to 94328f9 Compare October 17, 2018 22:14
@mary-poppins
Copy link

* Improve type checking within the CheckGuards function
* Change public API to allow returning of UrlTree instead of boolean
* Removed `andObservable` helper function in favor of inline implementation
* Flow `boolean | UrlTree` through guards check
* Add tests to verify behavior of `checkGuards` function flowing `UrlTree` properly
@jasonaden jasonaden force-pushed the FW-153_url_returned_from_guards branch from 94328f9 to 1cb4a3b Compare October 17, 2018 22:21
@jasonaden
Copy link
Contributor Author

Presubmit

@jasonaden jasonaden requested a review from IgorMinar October 18, 2018 00:33
@jasonaden
Copy link
Contributor Author

Global Presubmit

Copy link
Contributor

@sarunint sarunint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature!

@mary-poppins
Copy link

@jasonaden jasonaden force-pushed the FW-153_url_returned_from_guards branch from eeeb56b to 43e34dc Compare October 30, 2018 19:26
@mary-poppins
Copy link

@jasonaden jasonaden force-pushed the FW-153_url_returned_from_guards branch from 43e34dc to 43e505e Compare October 30, 2018 19:47
@jasonaden jasonaden added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release area: router labels Oct 31, 2018
@ngbot ngbot bot added this to the needsTriage milestone Oct 31, 2018
@jasonaden jasonaden added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Oct 31, 2018
@matsko matsko closed this in 9f4299d Oct 31, 2018
matsko pushed a commit that referenced this pull request Oct 31, 2018
matsko pushed a commit that referenced this pull request Oct 31, 2018
* Improve type checking within the CheckGuards function
* Change public API to allow returning of UrlTree instead of boolean

PR Close #26521
matsko pushed a commit that referenced this pull request Oct 31, 2018
* Removed `andObservable` helper function in favor of inline implementation
* Flow `boolean | UrlTree` through guards check
* Add tests to verify behavior of `checkGuards` function flowing `UrlTree` properly

PR Close #26521
matsko pushed a commit that referenced this pull request Oct 31, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: router cla: yes merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature(router): Provide a way to coalesce multiple failed guards so only a single redirect is called

8 participants