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
var __defProp=Object.defineProperty,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__publicField=(e,t,n)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,n),n);!function(){"use strict";class e{}class t extends e{constructor(e){super(),__publicField(this,"value"),this.value=e}}class n extends e{constructor(e){super(),__publicField(this,"value"),this.value=e}}class i extends e{constructor(e){super(),__publicField(this,"value"),this.value=e}}class r extends e{constructor(e,t="unrestricted"){super(),__publicField(this,"type"),__publicField(this,"value"),this.value=e,this.type=t}}class o extends e{constructor(e){super(),__publicField(this,"value"),this.value=e}}class a extends e{}class s extends e{constructor(e){super(),__publicField(this,"value"),this.value=e}}class l extends e{}class u extends e{constructor(e){super(),__publicField(this,"value"),this.value=e}}class c extends e{constructor(e,t="integer"){super(),__publicField(this,"value"),__publicField(this |
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
<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
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
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; | |
} | |
} |
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
/** | |
* - Add a button that fetches data from WordPress API when clicked, "Fetch posts" | |
* - Get WordPress posts using the fetch API | |
* - Display loading icon before calling fetch | |
* - Display the posts in a list (display title) once the response is loaded and remove the loading icon | |
*/ | |
/** | |
* Hints: | |
* |
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
function add(a, b) { | |
return parseInt(a) + parseInt(b); | |
} | |
if (!process.argv[2] || !process.argv[3]) { | |
console.log('Insufficient number of arguments! Give two numbers please!'); | |
} | |
else { | |
console.log('The sum of', process.argv[2], 'and', process.argv[3], | |
'is', add(process.argv[2], process.argv[3])); | |
} |
NewerOlder