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
{ | |
"after_expiration": null, | |
"allow_promotion_codes": null, | |
"amount_subtotal": null, | |
"amount_total": null, | |
"automatic_tax": { | |
"enabled": false, | |
"status": null | |
}, | |
"billing_address_collection": null, |
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 * as admin from 'firebase-admin'; | |
import Credential = admin.credential.Credential; | |
// replace this with your configuration | |
const DATABASE_URL = 'localhost:5003'; | |
const FIRESTORE_URL = 'localhost:5002'; | |
const AUTH_URL = 'localhost:9099'; | |
const PROJECT_ID = 'firebase-project-id'; // replace with your project ID | |
export function initializeEmulatorAdmin( |
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
// tslint:disable | |
import { Observable, Subscription } from 'rxjs'; | |
import { Type, ɵComponentType as ComponentType, ɵmarkDirty as markDirty } from '@angular/core'; | |
interface ComponentDefinition { | |
onInit(): void; | |
onDestroy(): void; | |
} |
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
const repositoryTextInput = document.querySelector('#repositoryName'); | |
const repositoriesElement = document.querySelector('#repositories'); | |
const SEARCH_URL = 'https://api.github.com/search/repositories?q='; | |
const cache = new Map(); | |
const repositoryNameChanges$ = fromEvent(repositoryTextInput, 'input').pipe( | |
map(e => e.target.value) | |
); |
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
const repositoryTextInput = document.querySelector('#repositoryName'); | |
const repositoriesElement = document.querySelector('#repositories'); | |
const SEARCH_URL = 'https://api.github.com/search/repositories?q='; | |
const repositoryNameChanges$ = fromEvent(repositoryTextInput, 'input').pipe( | |
map(e => e.target.value) | |
); | |
const stopClicked$ = fromEvent(stopElement, 'click'); |
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
const webpack = require('webpack'); | |
const path = require('path'); | |
const WebpackConfigFactory = require('@nestjs/ng-universal').WebpackConfigFactory; | |
const config = WebpackConfigFactory.create(webpack, { | |
server: './apps/api/src/main.ts' | |
}); | |
config.output = { | |
path: path.join(__dirname, './dist'), |
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
@Component({ | |
selector: 'toggle', | |
template: `{{ value }}`, | |
providers: [{ | |
provide: NG_VALUE_ACCESSOR, | |
useExisting: forwardRef(() => ToggleComponent), | |
multi: true | |
}] | |
}) | |
export class ToggleComponent implements ControlValueAccessor { |
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
<div class='mt-5'> | |
<crypto-selector (selected)="onCryptoSelected($event)"></crypto-selector> | |
<div class='price'> | |
{{ price$ | async }} | |
</div> | |
<ng-container *ngIf="(price$ | async) === undefined && (currency$ | async)"> | |
<div class='alert alert-info mt-2'> | |
Awaiting for Price... |
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
@Component({ | |
selector: 'my-app', | |
templateUrl: './app.component.html', | |
styleUrls: ['./app.component.css'], | |
changeDetection: ChangeDetectionStrategy.OnPush | |
}) | |
export class AppComponent { | |
public price$: Observable<string | undefined>; | |
public currency$ = new BehaviorSubject<string | undefined>(undefined); |
NewerOlder