Skip to content

Instantly share code, notes, and snippets.

View serhatkaya's full-sized avatar
☣️

Serhat Kaya serhatkaya

☣️
View GitHub Profile
@serhatkaya
serhatkaya / nvigtrsrktrr
Last active March 16, 2023 12:37
ggggg
export interface DomNavigatorSettings {
mode?: DomNavigatorMode;
selectedClassName?: string;
left?: number;
up?: number;
right?: number;
down?: number;
cols?: number;
select?: number;
ignoredClassList?: Array<string>;
@serhatkaya
serhatkaya / xdfdfdfdfdf
Last active February 28, 2023 14:41
ngx-dm-nv
export interface DomNavigatorSettings {
mode?: DomNavigatorMode;
selectedClassName?: string;
left?: number;
up?: number;
right?: number;
down?: number;
cols?: number;
select?: number;
ignoredClassList?: Array<string>;
@serhatkaya
serhatkaya / xd
Last active February 28, 2023 13:20
newgist
class DomNavigator {
constructor(options = {}) {
const {
activeClass = "active",
direction = "vertical",
useArrowKeys = true,
useTabKey = true,
useEnterKey = true,
itemsSelector = "[tabindex]",
ignoreSelectors = "",
import { Injectable } from '@angular/core';
import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
import { AuthService } from './auth.service';
import { Observable, BehaviorSubject, Subject } from 'rxjs';
import { switchMap, take, filter } from 'rxjs/operators';
@Injectable()
export class TokenInterceptor implements HttpInterceptor {
private refreshTokenInProgress = false;
private refreshTokenSubject: Subject<any> = new BehaviorSubject<any>(null);
@serhatkaya
serhatkaya / gist:dc5a641b38f6e8335d827a0125687937
Created December 11, 2022 21:25
Angular compability list with Node.js
|Angular CLI| Angular | NodeJS |TypeScript | RxJS Version |
|-----------|--------------------|------------------------------ |-----------|-----------------------------------------|
|- |2.x |6.0.x or later minor |2.0.x |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x |
|1.0.6 |4.x |6.9.x or later minor |2.2.x |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x |
|1.1.3 |4.x |6.9.x or later minor |2.3.x |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x |
|1.2.7 |4.x |6.9.x or later minor |2.3.x |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x |
|1.3.2 |4.2.x or later minor|6.9.x or later minor |2.4.x |5.0.x/5.1.x/5.2.x/5.3.x/5.4.x/5.5.x |
|1.4.10 |4.2.x or later minor|6.9.x/8.9.x or later minor
import { DOCUMENT } from '@angular/common';
import { Component, Inject, OnInit } from '@angular/core';
import {
DomNavigator,
DomNavigatorElement,
DomNavigatorMode,
} from 'ngx-dom-navigator';
@Component({
selector: 'app-root',
initNavigator() {
let container = this.doc.querySelector('#container') as DomNavigatorElement;
const navigator = new DomNavigator(container, {
mode: DomNavigatorMode.auto,
selectedClassName: 'selected',
});
}
import { DOCUMENT } from '@angular/common';
export class AppComponent implements OnInit {
constructor(@Inject(DOCUMENT) private doc: Document) {}
}
@serhatkaya
serhatkaya / dom-nav-4.ts
Created October 7, 2022 07:28
dom-nav-4
import {
DomNavigatorElement,
DomNavigator,
DomNavigatorMode,
} from 'ngx-dom-navigator';
body {
margin: 0;
background: #00a5f7;
}
#container {
display: flex;
padding: 1rem;
max-width: 80%;
justify-content: center;