$ docker ps -a
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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
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 { TestBed } from '@angular/core/testing'; | |
export interface ZooStateModel { | |
feedAnimals: string[]; | |
} | |
@StateRepository() | |
@State<ZooStateModel>({ | |
name: 'zoo', | |
defaults: { |
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 { TestBed } from '@angular/core/testing'; | |
export interface ZooStateModel { | |
feedAnimals: string[]; | |
} | |
export class FeedAnimals { | |
public static type: string = '[FeedAnimals]: action'; | |
constructor(public animalsToFeed: string[]) {} | |
} |
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
export interface Course { | |
id: number; | |
description: string; | |
iconUrl?: string; | |
courseListIcon?: string; | |
longDescription?: string; | |
category: string; | |
seqNo: number; | |
lessonsCount?: number; |
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
@StateRepository() | |
@State({ | |
name: 'courses', | |
defaults: createEntityCollections() | |
}) | |
@Injectable() | |
export class CoursesEntitiesState extends NgxsDataEntityCollectionsRepository<Course> {} | |
@StateRepository() |
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
// novels.state.ts | |
@Persistence({ | |
existingEngine: sessionStorage | |
}) | |
@State<Novel[]>({ | |
name: 'novels', | |
defaults: [] | |
}) | |
@Injectable() | |
export class NovelsState {} |
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
// novels.state.ts | |
@State<Novel[]>({ | |
name: 'novels', | |
defaults: [] | |
}) | |
@Injectable() | |
export class NovelsState {} | |
// detectives.state.ts | |
@State<Detective[]>({ |
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
@StateRepository() | |
@State({ | |
name: 'counter', | |
defaults: 0 | |
}) | |
@Injectable() | |
class CounterState extends NgxsDataRepository<number> | |
implements NgxsDataDoCheck, NgxsDataAfterReset { | |
private subscription: Subscription; |
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
@State({ | |
name: 'counter', | |
defaults: 0 | |
}) | |
@Injectable() | |
class CounterState implements NgxsOnChanges, NgxsOnInit, NgxsAfterBootstrap { | |
public ngxsOnChanges(): void { | |
// .. | |
} |
NewerOlder