-
Notifications
You must be signed in to change notification settings - Fork 2
Dmitrijs Savkins #7
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very well done!
{ | ||
path: 'guest-book', | ||
loadChildren: () => | ||
import('./guest-book/guest-book.routes').then((mod) => mod.routes), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using lazy loading - this is nice!
loadChildren: () => | ||
import('./posts/posts.routes').then((mod) => mod.routes), | ||
providers: [ | ||
PostsService, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Service is providedIn: 'root'. It means it is initialized when app is loaded and this is good practice. It will guarantee that Service data is persisted. In praticular example since it was already loaded on app level, you are providing once more it means you are creating it again. So there will be two Services :)
it('should not load entries when they were already loaded', () => { | ||
store.overrideSelector(selectUsersLoaded, true); | ||
testScheduler.run(({ hot, expectObservable }) => { | ||
actions$ = hot('-a--', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its very nice that you learned about marbles testing
GuestBookPageActions, | ||
} from './guest-book.actions'; | ||
|
||
export interface GuestBookState extends EntityState<GuestBookEntry> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For convenience state interface and default state usually are in separate state.ts file
No description provided.