forked from dappsnation/akita-ng-fire
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
465bfad
commit 2ff686c
Showing
40 changed files
with
392 additions
and
261 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome against localhost", | ||
"url": "http://localhost:4200", | ||
"webRoot": "${workspaceFolder}" | ||
} | ||
] | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# CollectionService | ||
The `CollectionService` provides all the CRUD methods needed to interact with Firestore. There is to type of operation : | ||
- Sync : listen on changes from your collection. | ||
- Write : update the collection. | ||
|
||
``` | ||
``` | ||
|
||
## Sync | ||
Collection Service provides methods to subscribe on changes from Firestore. | ||
|
||
|
||
``` | ||
``` | ||
|
||
## Write | ||
|
||
### Add | ||
Add a new document in your collection : | ||
``` | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './movie.model'; | ||
export * from './movie.query'; | ||
export * from './movie.service'; | ||
export * from './movie.store'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export interface Movie { | ||
id: string; | ||
title: string; | ||
description: string; | ||
} | ||
|
||
/** | ||
* A factory function that creates Movie | ||
*/ | ||
export function createMovie(params: Partial<Movie>) { | ||
return { | ||
|
||
} as Movie; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { QueryEntity } from '@datorama/akita'; | ||
import { MovieStore, MovieState } from './movie.store'; | ||
|
||
@Injectable({ providedIn: 'root' }) | ||
export class MovieQuery extends QueryEntity<MovieState> { | ||
|
||
constructor(protected store: MovieStore) { | ||
super(store); | ||
} | ||
|
||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { MovieStore, MovieState } from './movie.store'; | ||
import { AngularFirestore } from '@angular/fire/firestore'; | ||
import { CollectionConfig, CollectionService } from 'akita-ng-fire'; | ||
|
||
@Injectable({ providedIn: 'root' }) | ||
@CollectionConfig({ path: 'movies' }) | ||
export class MovieService extends CollectionService<MovieState> { | ||
|
||
constructor(db: AngularFirestore, store: MovieStore) { | ||
super(db, store); | ||
} | ||
|
||
} |
Oops, something went wrong.