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
// If you use some "CSS reset" (Tailwind, Bootstrap, | |
// modern-normalize...), then mat-icon inside the | |
// Angular Material mat-icon-button will not be centered | |
// correctly - it will be shifted 2 pixels down. | |
// Here is the fix: | |
.mdc-icon-button { | |
display: flex !important; | |
flex-flow: row; | |
align-items: center; | |
} |
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 { isDevMode } from '@angular/core'; | |
const singletons = new Set<symbol>(); | |
export function singletonOnly(unique: symbol) { | |
if (!isDevMode() || typeof window === 'undefined') { | |
return; | |
} | |
if (singletons.has(unique)) { | |
const msg = unique.toString() + ' MUST BE A SINGLETON! It was instantiated more than once.'; |
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 { computed, type Injector, isSignal, signal, type Signal, untracked } from '@angular/core'; | |
import { toSignal } from '@angular/core/rxjs-interop'; | |
import { AbstractControl } from '@angular/forms'; | |
import { startWith } from 'rxjs'; | |
/** | |
* Returns a signal that contains the value of a control (or a form). | |
* @param control | |
* @param injector | |
*/ |
OlderNewer