Skip to content

Instantly share code, notes, and snippets.

View AmirTugi's full-sized avatar

Amir Tugendhaft AmirTugi

View GitHub Profile
@AmirTugi
AmirTugi / category--api.service.ts
Last active March 16, 2019 09:28
Independent Search Component Akita Store
import { Injectable } from '@angular/core';
import { categoriesMock } from './categories-mock';
import { of } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class CategoryApiService {
search() {
return of(categoriesMock)
import { Component, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges } from '@angular/core';
import { CategoryModel } from './category/model';
import { Observable } from 'rxjs';
import { CategoryQuery } from './category/store.query';
import { CategoryStoreService } from './category/store.service';
export type SearchEvent = { searchTerm: string, selectedCategory: CategoryModel};
@Component({
selector: 'app-search',
export const ToastTheme: ComponentMultiStyleConfig = {
parts: ['container', 'icon', 'action', 'content'],
type: { // 1. This is not supported by th `ComponentStyleConfig` type
info: { // 2. Who will handle the assigning to `theme.type[props.type]`?
container: {} // 3. Who will handle the `theme.type[props.type][part]`?
}
},
variants: {
default: {} // This is b
}