-
Notifications
You must be signed in to change notification settings - Fork 22
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: lecture-5 HW #122
base: master
Are you sure you want to change the base?
feat: lecture-5 HW #122
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.
Привет!
Оставил пару комментариев, часть из них - вопросы, буду ждать твоего фидбека по ним. В остальном - МР пушка 🔥! Читается на одном дыхании, даже если уберешь комментарии (они мне тут кажутся излишними)
@@ -21,5 +21,6 @@ import {PopupHostModule} from './components/popup-host/popup-host.module'; | |||
PopupHostModule, | |||
], | |||
bootstrap: [AppComponent], | |||
exports: [], |
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.
Неплохо было бы подчистить)
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.
Принял
@@ -26,4 +26,9 @@ export class ProductsListComponent implements OnInit { | |||
// eslint-disable-next-line no-console | |||
console.log(event); | |||
} | |||
|
|||
onLoad(event: unknown) { |
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.
Почему в типизации поставил unknown
? Разве не известно, что будет приходить?
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.
Это была заглушка про которую я потом забыл, исправлю
@@ -0,0 +1,4 @@ | |||
export enum LoadDirection { | |||
UP, |
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.
Лучше значениям enum
давать говорящие имена, а не использовать дефолтные (0, 1, 2, ...)
Почему говорящие имена лучше? - если захотим добавить логирование или собирать метрики, то сделать это будет проще, т.к. будет отправляться не 0
, 1
и т.д., а, например, before
, after
и т.д.
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.
Спасибо за совет, думаю так действительно лучше
selector: '[appScrollWithLoading]', | ||
}) | ||
export class ScrollWithLoadingDirective { | ||
@Output() loadData = new EventEmitter<LoadDirection>(); |
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.
Я бы readonly
добавил еще)
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.
Принял
No description provided.