Skip to content

refactor(router): Update TitleStrategy to useFactory - #46876

Closed
atscott wants to merge 1 commit into
angular:mainfrom
atscott:defaulttitleservicefactory
Closed

atscott wants to merge 1 commit into
angular:mainfrom
atscott:defaulttitleservicefactory

Conversation

@atscott

@atscott atscott commented Jul 18, 2022

Copy link
Copy Markdown
Contributor

The implementation of the DefaultTitleStrategy was modeled after the
existing strategy patterns in the Router. These patterns were developed
before the providedIn syntax for injectables. We can simplify the
model a lot by providing the default in the factory of the abstract
class.

Note that the other strategy patterns aren't touched in this PR due to
how long they've existed. Because they have been there for such a long
time, it's possible there will need to be some adjustments to code
if/when they are refactored to do the same.

The implementation of the `DefaultTitleStrategy` was modeled after the
existing strategy patterns in the Router. These patterns were developed
before the `providedIn` syntax for injectables. We can simplify the
model a lot by providing the default in the factory of the abstract
class.

Note that the other strategy patterns aren't touched in this PR due to
how long they've existed. Because they have been there for such a long
time, it's possible there will need to be some adjustments to code
if/when they are refactored to do the same.
@atscott atscott added area: router target: patch This PR is targeted for the next patch release labels Jul 18, 2022
@atscott
atscott requested a review from AndrewKushnir July 18, 2022 20:27
@ngbot ngbot Bot modified the milestone: Backlog Jul 18, 2022
@pullapprove
pullapprove Bot requested review from alxhub and dylhunn July 18, 2022 20:27

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice refactoring 馃憤

@pullapprove
pullapprove Bot requested a review from AndrewKushnir July 18, 2022 20:35

@AndrewKushnir AndrewKushnir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@pullapprove
pullapprove Bot requested a review from jessicajaniuk July 18, 2022 20:36

@jessicajaniuk jessicajaniuk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

reviewed-for: public-api, fw-testing

@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Jul 18, 2022
@jessicajaniuk

Copy link
Copy Markdown
Contributor

This PR was merged into the repository by commit bde925b.

jessicajaniuk pushed a commit that referenced this pull request Jul 18, 2022
The implementation of the `DefaultTitleStrategy` was modeled after the
existing strategy patterns in the Router. These patterns were developed
before the `providedIn` syntax for injectables. We can simplify the
model a lot by providing the default in the factory of the abstract
class.

Note that the other strategy patterns aren't touched in this PR due to
how long they've existed. Because they have been there for such a long
time, it's possible there will need to be some adjustments to code
if/when they are refactored to do the same.

PR Close #46876
jessicajaniuk pushed a commit that referenced this pull request Jul 18, 2022
The implementation of the `DefaultTitleStrategy` was modeled after the
existing strategy patterns in the Router. These patterns were developed
before the `providedIn` syntax for injectables. We can simplify the
model a lot by providing the default in the factory of the abstract
class.

Note that the other strategy patterns aren't touched in this PR due to
how long they've existed. Because they have been there for such a long
time, it's possible there will need to be some adjustments to code
if/when they are refactored to do the same.

PR Close #46876
@angular-automatic-lock-bot

Copy link
Copy Markdown

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 Aug 18, 2022
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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants