Skip to content

Instantly share code, notes, and snippets.

View Burgov's full-sized avatar

Bart van den Burg Burgov

View GitHub Profile
this.route.params.take(1).subscribe(params => {
this.initializer.initialize()
.subscribe(
() => { this.router.navigateByUrl(params['returnUrl'] || '/', {clearHistory: true}) },
() => { this.router.navigateByUrl(params['returnUrl'] || '/', {clearHistory: true}) }
);
});
next a
start handling a
next b
next c
next d
finish handling a
(skip b, c)
start handling d
next e
next f
import * as imagepicker from 'nativescript-imagepicker';
import { ImagePickerMediaType } from 'nativescript-imagepicker';
import { EMPTY, Observable } from 'rxjs';
import { knownFolders } from 'tns-core-modules/file-system';
import { fromFile } from 'tns-core-modules/image-source';
import * as dialogs from 'tns-core-modules/ui/dialogs';
import * as utils from 'tns-core-modules/utils/utils';
export declare const NO_IMAGE_SELECTED = 'no-image-selected';
@Burgov
Burgov / input.scss
Created October 2, 2020 08:17
Generated by SassMeister.com.
img, video {
height: 200px;
:host-context(.desktop) & {
height: 300px;
}
}
:host-context(.desktop) {
img, video {
@Burgov
Burgov / fritsTracking.js
Last active August 31, 2021 12:42 — forked from stijnjanmaat/fritsTracking.js
Frits Tracking at Affiliate
// Managed by Frits
const init = () => {
let _handler = () => {}; // just an empty function in case no listener is registered.
setTimeout(() => {
_handler({ myEventData: 'something' });
}, 1000);
return {
onEvent: (handler) => { _handler = handler }
$ git diff
diff --git a/package.json b/package.json
index a1e396fb4..0514a26ee 100644
--- a/package.json
+++ b/package.json
@@ -45,20 +45,20 @@
"dependencies": {
"@angular-material-components/color-picker": "7.0.0",
"@angular-material-components/datetime-picker": "7.0.0",
- "@angular/animations": "13.0.2",
import { promisify } from 'util';
import axios from 'axios';
const exec = promisify(require('child_process').exec);
async function run() {
const affected = [];
for (const project of ['api', 'frontend', 'functions']) {
console.error(`Project: ${project}`);
@Component({
selector: 'parent-component',
template: '<child-component [myInput]="myData" (myOutput)="handleEvent($event)"></child-component>'
})
export class ParentComponent {
protected myData = 'my data';
handleEvent(counter: number) {
alert(counter);
}
@Component({
selector: 'parent-component',
template: '<child-component></child-component>'
})
export class ParentComponent implements AfterViewInit {
@ViewChild(ChildComponent) child!: ChildComponent;
protected myData = 'my data';
handleEvent(counter: number) {
@Component({
selector: 'parent-component',
template: '<child-component><content-component></content-component></child-component>'
})
export class ParentComponent implements AfterViewInit {
}
@Component({
selector: 'child-component',
template: '<button (click)="this.increaseContentCounter()"></button><ng-content></ng-content>'