Skip to content

Instantly share code, notes, and snippets.

View BioPhoton's full-sized avatar
🙃
implementing and fixing bugs

Michael Hladky BioPhoton

🙃
implementing and fixing bugs
View GitHub Profile
# <MEASUREMENT_NAME>
<!-- TLDR_START -->
<!-- TLDR_END -->
<!-- CODE_VERSIONING_START -->
<!-- CODE_VERSIONING_END -->
## URL

Confusing

  • ( and ) count as frame
describe('`(` and `)`', () =>  {
  let testScheduler: TestScheduler;

  beforeEach(() => {
    testScheduler = new TestScheduler(observableMatcher);
  });

Reactive Forms

In this section we will learn the basics of reactive forms in angular. We will learn how to set reactive forms up, use built-in validators and display validation errors.

Before we start there are some things to know. Ractive forms are fully functional without any HTML. All of the form depending logic is placed in the conponent as code and not in the template. This make our html very easy to read and edit. We can move parts of the HTML without break form related logic.

import * as fs from 'fs-extra';
import * as path from 'path';
import { bindNodeCallback, concat, Observable, from } from 'rxjs';
import { map } from 'rxjs/operators';
export function globCopy(
patterns: string[],
dir: string
): Observable<{patterns: string[], num: number}> {
return bindNodeCallback(copy)(patterns, dir)
@BioPhoton
BioPhoton / Reactive-Angular-Terminology.md
Last active March 11, 2022 12:39
List of used terms related to reactivity in context of Angular and their description

Reactive Angular Terminology

To have a common terminology I list some of the used terms here and explain their meaning and usage.

Used terms:

  • Asynchronous/Observable Primitive
  • Reactive Primitives
  • Primitive Reactive Problems
  • Bind
  • Connect

Decision on message format in the deprecation documentation in code

As we need to decide on the message format (i.e. It's important if we focus on linter or docs), I create a component that lets you test the message in many different places.

@BioPhoton
BioPhoton / migration-timeline-deprecation-code-examples.md
Last active July 31, 2020 15:08
Migration Timeline - Deprecation Code Examples

Deprecations and their breaking change

Deprecations

The information about a certain deprecation in the library also includes the version when the breaking change will happen as well as code examples for the usage before and after the deprecation.

This snippets are presented as highlited text in the migration timeline and also open up the code in StackBlitz. To provide maintainable code examples we can use version range specifier to let StackBlitz automatically install new versions until the version of the breaking change.

@BioPhoton
BioPhoton / myChannel.js
Last active August 29, 2015 14:24
AngularJS Event-Channel (slides (here) [http://slides.com/michael_hladky/event-channel#/] )
.config('myEvents', function() {
valueChanged : 'valueChanged'
});
.service('myChannel', function($rootScope, myEvents) {
var publishValueChanged = function (newVlaue) {
var args = {value: newVlaue};
$rootScope.$emit(myEvents.valueChanged, args);
};