RxJS. Delay from array
import { of, from } from 'rxjs';
import { map, concatMap, delay } from 'rxjs/operators';
from([2,4,6,8]).pipe(
concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log);
Stackblitz (in console):
import { of, from } from 'rxjs';
import { map, concatMap, delay } from 'rxjs/operators';
from([2,4,6,8]).pipe(
concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log);
Stackblitz (in console):
Нажатие клавиш Enter
и Space
на элементах <button>
и <a>
помимо событий клавиатуры (keydown
) вызывает событие клика мыши click
const link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css';
link.integrity = 'sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO'; // необязательно
link.crossOrigin = 'anonymous'; // необязательно
document.head.appendChild(link);
const script = document.createElement('script');
script.src = 'https://code.jquery.com/jquery-3.3.1.slim.min.js';
script.integrity = 'sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo'; // необязательно
s...
Опыт создание мобильной версии Angular приложения, выбор нужной версии на основе по ширине окна браузера. Размещение обеих версий на одном домене.
Add dist folder of dependency libs to main tsconfig.json
and run command
nx run need:build --with-deps