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

feat(scully runtime config): user forRoot to pass config to Scully #271

Merged
merged 2 commits into from
Feb 4, 2020

Conversation

SanderElias
Copy link
Contributor

The transferState service now only gets activated when the config using forRoot says so.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Other... Please describe:

What is the current behavior?

transferStateService is always monitoring the route, and trying to load data, even when s/getState is not used at all.

What is the new behavior?

transferStateService is only monitoring if the user tells it so by using the config in forRoot
like this:

@NgModule({
  declarations: [AppComponent],
  imports: [
    BrowserModule,
    HttpClientModule,
    AppRoutingModule,
    ScullyLibModule.forRoot({useTranferState: true}),
  ],
  bootstrap: [AppComponent],
})
export class AppModule {}

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

The transferState service now only gets activated when the config using forRoot says so.
Copy link
Contributor

@jorgeucano jorgeucano left a comment

Choose a reason for hiding this comment

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

I love it, but this is a breaking change if the people by default have false, we need add this into the document with the PR :)

@Villanuevand
Copy link
Contributor

Im totally agree with @jorgeucano
We need to update the docs, and also release the new version ..

…event braking change

This is a better default aas it's not breaking anymore, but still enables people to opt-out
@SanderElias SanderElias merged commit 7d643c0 into master Feb 4, 2020
@SanderElias SanderElias deleted the sander/forRootConfig branch February 4, 2020 10:28
@SanderElias
Copy link
Contributor Author

I changed the default to true so there is no breaking chance anymore.

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.

3 participants