This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {Directive, Input} from '@angular/core'; | |
| import {NgControl} from '@angular/forms'; | |
| @Directive({ | |
| selector: '[disableControl]', | |
| }) | |
| export class DisableControlDirective { | |
| @Input() | |
| set disableControl(disabled: boolean) { | |
| const method = disabled ? 'disable' : 'enable'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { SimpleChanges } from '@angular/core'; | |
| export function AsyncInput(inputName?: string) { | |
| return (target, rxInputName: string) => { | |
| inputName = inputName || rxInputName.slice(0, -1); // Remove '$' ('data$' => 'data') | |
| const oldOnChanges = target.ngOnChanges; | |
| const oldOnDestroy = target.ngOnDestroy; | |
| target.ngOnChanges = function(changes: SimpleChanges) { | |
| const inputChange = changes[inputName]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| Component, | |
| Input, | |
| OnChanges, | |
| SimpleChanges, | |
| OnDestroy, | |
| } from '@angular/core'; | |
| import { | |
| MatDialogRef, | |
| MatDialogConfig, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { CommonModule, NgClass } from '@angular/common'; | |
| import { Component } from '@angular/core'; | |
| import { UntilDestroy } from '@ngneat/until-destroy'; | |
| import { concat, timer } from 'rxjs'; | |
| import { delay, map, repeat, startWith, takeWhile, tap } from 'rxjs/operators'; | |
| @UntilDestroy() | |
| @Component({ | |
| selector: 't-logo', | |
| standalone: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require('fs'); | |
| const path = require('path'); | |
| const exec = require('child_process').exec; | |
| const ts = require('typescript'); | |
| const tsHost = ts.createCompilerHost( | |
| { | |
| allowJs: true, | |
| noEmit: true, | |
| isolatedModules: true, |
OlderNewer