Skip to content

Instantly share code, notes, and snippets.

View marcellkiss's full-sized avatar
🎯
Focusing

Marcell Kiss marcellkiss

🎯
Focusing
View GitHub Profile
@marcellkiss
marcellkiss / custom-builder-debug
Last active December 7, 2023 14:09
Logs: debugging custom-builder
> nx run angularboost:build:production
[DomElementSchemaRegistry::constructor] Reading property Y undefined
[DomElementSchemaRegistry::constructor] Reading property Y undefined
[@angularboost/custom-builder] customApplicationBuilder started
[@angularboost/custom-builder] Detected options: {
customElementsPrefix: 'my-',
customElementsManifestFilePath: 'custom-elements-manifest.json'
}
[@angularboost/custom-builder] Reading property X [Function: X]
[@angularboost/custom-builder] Writing property Y
@marcellkiss
marcellkiss / typescript-decorator-example
Last active June 29, 2022 15:52
Typescript decorator example for unsubscribe
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { ProductDto } from '@ev-customer-portal/frontend/api-client';
import { interval, Subject, takeUntil } from 'rxjs';
@AddDestroy$()
@Component({...})
export class RequestAccessDialogComponent {
public sub = interval(1000)
.pipe(untilDestroy$(this))
.subscribe((v) => {
@marcellkiss
marcellkiss / test-setup.ts
Created March 9, 2022 17:09
Setting registerLocaleData once with jest
import { registerLocaleData } from '@angular/common';
import localeDe from '@angular/common/locales/de';
import { LOCALE_ID } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import 'jest-preset-angular/setup-jest';
registerLocaleData(localeDe);
// Error message:
import { DomElementSchemaRegistry, ElementSchemaRegistry, SchemaMetadata } from '@angular/compiler';
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
/**
* As we are using the custom tags of the si-design-system,
* we are forced to turn off template validation completely (applying CUSTOM_ELEMENTS_SCHEMA)
* Writing a custom SchemaRegistry could be a solution to retain proper validation.
* Still, there's no feasable solution at the moment
{
"event": "Checkout.PaymentComplete",
"eventData": {
"checkout": {
"completed": true,
"id": "187376",
"test_variant": "subscriptionManagement"
},
"product": {
"id": "0",
{
"event": "Checkout.Complete",
"eventData": {
"checkout": {
"completed": true,
"id": "187376",
"test_variant": "subscriptionManagement"
},
"product": {
"id": "0",

Simply write an email to support@interpolly.com with your registered email address and we will delete every piece of information related to you account

`@Pipe({
name: 'myCustomPipe'
})
export class MyCustomPipe implements PipeTransform {
// Inject what you need
constructor(private datePipe: DatePipe) { }
transform(value: any, args?: string): any {
if (args.includes['date']) {
return this.datepipe.transform(value, 'yyyy-MM-dd');
document.querySelectorAll('.noteText').forEach(e => console.log(e.innerText.split('\n')[0]))
@marcellkiss
marcellkiss / target_blank_icon.css
Created April 8, 2019 15:04
Target blank icon
a[target="_blank"]::after {
content: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAQElEQVR42qXKwQkAIAxDUUdxtO6/RBQkQZvSi8I/pL4BoGw/XPkh4XigPmsUgh0626AjRsgxHTkUThsG2T/sIlzdTsp52kSS1wAAAABJRU5ErkJggg==);
margin: 0 3px 0 5px;
}