This file contains 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
npm install ngx-highlightjs |
This file contains 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 { HighlightPlusModule } from 'ngx-highlightjs'; | |
@Component({ | |
selector: 'app-root', | |
template: ` | |
<pre [gist]="gistId" (gistLoaded)="gist = $event"> | |
<code [highlight]="gist | gistContent: 'main.js'"></code> | |
</pre> | |
`, | |
standalone: true, |
This file contains 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
<carousel [data]="items"> | |
<carousel-thumbs></carousel-thumbs> | |
<div *carouselItem="let item"> | |
<img src="item.src"> | |
</div> | |
<div *carouselThumb="let item"> | |
<img src="item.thumb"> | |
</div> | |
</carousel> |
This file contains 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 { Pipe, PipeTransform } from '@angular/core'; | |
import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; | |
@Pipe({ | |
name: 'sanitizeHtml' | |
}) | |
export class HtmlSanitizerPipe implements PipeTransform { | |
constructor(private sanitizer: DomSanitizer) { | |
} |
This file contains 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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll] | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell] | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open] | |
"MuiVerb"="@photoviewer.dll,-3043" | |
[HKEY_CLASSES_ROOT\Applications\photoviewer.dll\shell\open\command] |
This file contains 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, ElementRef, HostListener, Renderer2} from '@angular/core'; | |
@Directive({ | |
selector: '[ripple]' | |
}) | |
export class RippleDirective { | |
hostEl; | |
constructor(private renderer: Renderer2, el: ElementRef) { |
This file contains 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
<h1>{{ textStream | async }}</h1> | |
<div> | |
<input type="text" [(ngModel)]="textInput"> | |
<button (click)="run()">Run</button> | |
</div> |
This file contains 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 { Injectable, PLATFORM_ID } from '@angular/core'; | |
import { DOCUMENT, isPlatformBrowser } from '@angular/common'; | |
import { BehaviorSubject, Observable, from, EMPTY } from 'rxjs'; | |
import { catchError, tap, map, filter, take } from 'rxjs/operators'; | |
import { ExternalLibrary, ExternalLibraryOptions, EXTERNAL_LIBRARY_OPTIONS } from './models'; | |
// @dynamic | |
@Injectable({ | |
providedIn: 'root' |
This file contains 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
Remove `ngStyle` from `.ng-scrollbar-wrapper` in the template | |
<div class="ng-scrollbar-wrapper" [ngAttr]="state" [ngStyle]="autoHeightStyles"> | |
To | |
<div class="ng-scrollbar-wrapper" [ngAttr]="state"> |
This file contains 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
.hide-native-scrollbar { | |
scrollbar-width: none; /* Firefox 64 */ | |
-ms-overflow-style: none; /* IE 11 */ | |
&::-webkit-scrollbar { /** Webkit */ | |
display: none; | |
} | |
} |
NewerOlder