Skip to content

Instantly share code, notes, and snippets.

View alex-steinberg's full-sized avatar

Alex Steinberg alex-steinberg

  • Cape Town
View GitHub Profile
@LayZeeDK
LayZeeDK / angular-member-ordering.md
Created March 18, 2021 21:53
Ordering of Angular component class members.

Ordering of Angular component class members

Use the following order of groups to organize Angular components:

  1. Private properties.
  2. Data binding properties.
  3. View and content properties.
  4. UI properties.
  5. Component API properties.
  6. Constructor.
  7. Lifecycle hooks.
  8. Event handlers.
@LayZeeDK
LayZeeDK / auth.guard.spec.ts
Created July 16, 2020 11:32
AuthGuard: Isolated route guard test suite.
import {
ActivatedRouteSnapshot,
Params,
Route,
Router,
RouterStateSnapshot,
UrlSegment,
} from '@angular/router';
import { AuthGuard } from './auth.guard';
@slavafomin
slavafomin / 0-README.md
Last active March 15, 2023 13:35
Angular 2 match other field validator / Password match validator

Angular 2 match other field validator

This custom validator for Angular 4 allows you to have fields that must be equal to some other fields. Such validator is very useful for password confirmation validation, for example.

Besides checking if two values are matching, it also subscribes to changes from other control and re-validates when either of two controls is updated.

Usage

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active July 26, 2024 10:00
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S