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: expose RouterStateModel in @ngxs/router-plugin #445

Merged
merged 1 commit into from
Jun 15, 2018

Conversation

juracy
Copy link
Contributor

@juracy juracy commented Jun 14, 2018

I need these imports:

import { RouterState } from '@ngxs/router-plugin';
import { RouterStateModel } from '@ngxs/router-plugin/src/router.state';

to use this:

this.store.select(RouterState)
  .subscribe((route: RouterStateModel) => console.log(route.state));

And I think it should be better:

import { RouterState, RouterStateModel } from '@ngxs/router-plugin';

@juliusstoerrle
Copy link
Contributor

I don't mind, but shouldn't typescript know/infer the type in the next function by itself? It does it for my normal subscriptions!

@juracy
Copy link
Contributor Author

juracy commented Jun 14, 2018

@juliusstoerrle Using the syntax of select: this.store.select(RouterState) there isn't a type inference...

@amcdnl amcdnl merged commit 62ac122 into ngxs:master Jun 15, 2018
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