Skip to content

Instantly share code, notes, and snippets.

View fyodorio's full-sized avatar
💻
Sitting here, making some stuff...

Fyodor fyodorio

💻
Sitting here, making some stuff...
View GitHub Profile
@fyodorio
fyodorio / index.html
Created January 7, 2022 21:12
Tic Tac Toe
<div id="errors" style="
background: #c00;
color: #fff;
display: none;
margin: -20px -20px 20px;
padding: 20px;
white-space: pre-wrap;
"></div>
<div id="root"></div>
<script>
@fyodorio
fyodorio / configurations.facade.ts
Last active August 23, 2021 12:29
Example of NgRx facade
@Injectable()
export class ConfigurationsFacade {
/**
* Combine pieces of state using createSelector,
* and expose them as observables through the facade.
*/
loaded$ = this.store.pipe(select(ConfigurationsSelectors.getConfigurationsLoaded));
failed$ = this.store.pipe(select(ConfigurationsSelectors.getConfigurationsLoadFailed));
allConfigurations$: Observable<Configuration[]> = this.store.pipe(select(ConfigurationsSelectors.getAllConfigurations));
selectedConfigurations$ = this.store.pipe(select(ConfigurationsSelectors.getSelected));
<div class="app">
<div class="header">
<div>☎ ♻ ✪</div>
<span></span>
<div>mydartapp.io</div>
</div>
<div class="navigation">
<div>Welcome</div>
@fyodorio
fyodorio / index.html
Created July 22, 2018 18:19
My First Dart Web App
<div class="app">
<h1 class="header">My Great Dart Web App</h1>
<div class="button">DO THE THING</div>
<div class="output"></div>
</div>