Skip to content

Instantly share code, notes, and snippets.

View viktishchenko's full-sized avatar

Viktor Tishchenko viktishchenko

View GitHub Profile
@viktishchenko
viktishchenko / index.js
Created August 26, 2023 05:53
Selector property of @component decorator support, element selector, attribute selector and class selector.
1. Element selector:
@Component({
selector: 'app-servers'
})
Usage: <app-servers></app-servers>
2. Attribute selector:
// Перейдем к примерам. ngIf:
<ng-container *ngIf="interval$ | async as counter">
<p>{{ counter }}</p>
</ng-container>
// Скомпилированный шаблон:
<ng-template [ngIf]="interval$ | async" let-counter>
<ng-container>
@viktishchenko
viktishchenko / Arrow-Function-Snippets.md
Last active April 6, 2022 05:45
Arrow Function Snippets

Arrow Function Snippets

Below is a list of all available snippets and the triggers of each one. The means the TAB key and the final cursor position.

Arrow Function

Trigger Description Result JS/TS
af→ implicit return without args () => █
afa→ implicit return with arg(s) (arg) =&gt; █