router.createUrlTree
ngOnInit() {
fromEvent(document, 'click')
.pipe(debounceTime(300))
.subscribe((event) => {
const targetElement = event.target;
if(!targetElement) {
return;
}
const clickedInside = this.elementRef.nativeElement.contains(targetElement);
if(!clickedInside) {
this.clickOutside.emit(event);
}
});
}
Нужно ли везде использовать TypeScript?
или это хайп?
Есть ли смысл использовать Typescript в пет проектах?
типа создал мини игру 15 строчках кода на TypeScript?
Или он только в крупных проектах нужен? и вообще все прям без него будто не могут писать судя по отзывам или это какойто хайп или реклама Microsoft
On each asynchronous event, Angular performs change detection over the entire component tree. Although the code which detects for changes is optimized for inline-caching, this still can be a heavy computation in complex applications. A way to improve the performance of the change detection is to not perform it for subtrees which are not supposed to be changed based on the recent actions.
const params = codes.reduce(
(acc, code) => acc.append('codes', `${code}`),
new HttpParams(),
);
this.http.get<ReportModel>(this.listOfStrongAlcoholReports, { params });
codes
это [200, 262 ]
HttpParams
const params = new HttpParams({
fromObject: { codes: codes.map(String) }
});
combineLatest([o1, o2, o3])
combineLatest({
o1: o1$,
o2: o2$,
})
combineLatest([tank$, keys$, canvasSizes$])
keys$.pipe(
withLatest(tank$),
withLatest(canvasSizes$),
)