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

Latest Version #1

Merged
merged 68 commits into from
Sep 19, 2017
Merged

Latest Version #1

merged 68 commits into from
Sep 19, 2017

Conversation

phillipzada
Copy link
Owner

No description provided.

MikeRyanDev and others added 30 commits July 28, 2017 13:32
This commit fixes the search path for type definition files
of the build task which otherwise occasionally results in a
build error (reported on Windows and OSX).
This adds a serializer that can be customized for returning the router state snapshot. By default, the entire RouterStateSnapshot is returned. Documentation has been updated with example usage.

```ts
import { StoreModule } from '@ngrx/store';
import {
  StoreRouterConnectingModule,
  routerReducer,
  RouterStateSerializer
} from '@ngrx/router-store';

export interface RouterStateUrl {
  url: string;
}

export class CustomSerializer implements RouterStateSerializer<RouterStateUrl> {
  serialize(routerState: RouterStateSnapshot): RouterStateUrl {
    const url = routerState ? routerState.url : '';

    // Only return an object including the URL
    // instead of the entire snapshot
    return { url };
  }
}

@NgModule({
  imports: [
    StoreModule.forRoot({ routerReducer: routerReducer }),
    RouterModule.forRoot([
      // routes
    ]),
    StoreRouterConnectingModule
  ],
  providers: [
    { provide: RouterStateSerializer, useClass: CustomSerializer }
  ]
})
export class AppModule { }
```

Closes #97, #104, #237
…#259)

The injector behavior is different when compiled through AOT such that
provided tokens aren't resolved before the factory function is executed.
This fix uses the injector to get the reducers provided through tokens.

Reference #189
MikeRyanDev and others added 29 commits August 18, 2017 11:45
- Fixes the type for the selectedUserId in the example.
- Fixes the link to creating an entity adapter.
@phillipzada phillipzada merged commit 90901e3 into phillipzada:master Sep 19, 2017
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.