Skip to content

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

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft

Dmitrijs Savkins #7

wants to merge 22 commits into from

Conversation

dmitrijs-ctco
Copy link

No description provided.

@dmitrijs-ctco dmitrijs-ctco changed the title Dmitrijs savkins Dmitrijs Savkins May 29, 2025
Copy link
Collaborator

@alexbaluhin alexbaluhin left a 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),
Copy link

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,
Copy link

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--', {
Copy link

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> {
Copy link

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

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