18.2.1 • Published 12 months ago

@nx-ddd/firestore-angular-adapter v18.2.1

Weekly downloads
-
License
-
Repository
github
Last release
12 months ago

@NxDDD/FirestoreAngularAdapter

@nx-ddd/firestore-angular-adapter is an Angular plugin for @nx-ddd/firestore.

Install

$ npm i @nx-ddd/firestore-angular-adapter

Usage

// apps/app/src/app/main.ts
import 'reflect-metadata';
import '@angular/compiler';
import { provideFirestoreAdapter } from '@nx-ddd/firestore/adapters/firebase';
import { UserRepository } from 'libs/common/infrastructure/repositories/user.repository';
import { initializeApp, provideFirebaseApp } from '@angular/fire/app';
import { getFirestore, provideFirestore } from '@angular/fire/firestore';
import dayjs from 'dayjs';

const app = initializeApp({...});

export const appConfig: ApplicationConfig = {
  providers: [
    importProvidersFrom(
      provideFirebaseApp(() => initializeApp(environment.firebase)),
      provideFirestore(() => getFirestore()),
      BrowserModule,
      HttpClientModule,
      provideFirestoreAdapter(),
    ),
  ]
};

@Component({
  selector: 'app'
})
export class App {
  repository = injector.get(UserRepository);

  await repository.create({
    id: '0001',
    name: 'test',
    createdAt: dayjs('2022-01-01'),
    updatedAt: dayjs('2022-01-01'),
  });
  const user = await repository.get({id: '0001'});
  console.debug('user:', user);
}

bootstrapApplication(App, appConfig).catch((err) =>
  console.error(err)
);
18.2.1

12 months ago

17.14.0

1 year ago

18.2.0

12 months ago

18.0.0

12 months ago

17.10.0

1 year ago

17.12.0

1 year ago

17.3.0

1 year ago

17.5.0

1 year ago

17.3.2

1 year ago

17.3.1

1 year ago

17.1.0

1 year ago

17.7.0

1 year ago

17.3.4

1 year ago

17.3.3

1 year ago

17.9.0

1 year ago

17.7.1

1 year ago

17.3.5

1 year ago

17.13.0

1 year ago

18.1.0

12 months ago

17.11.0

1 year ago

17.0.3

1 year ago

17.2.0

1 year ago

17.0.2

1 year ago

17.4.0

1 year ago

17.0.4

1 year ago

17.0.1

1 year ago

17.0.0

1 year ago

17.6.1

1 year ago

17.6.0

1 year ago

17.8.0

1 year ago

16.3.1

1 year ago

15.1.1

2 years ago

15.1.0

2 years ago

15.0.1

2 years ago

6.0.3

2 years ago

6.0.4

2 years ago

5.15.0

2 years ago

5.14.0

2 years ago

5.13.0

2 years ago

5.12.0

2 years ago

5.11.0

2 years ago

16.2.0

2 years ago

16.1.1

2 years ago

16.1.0

2 years ago

16.0.0

2 years ago

5.6.0

2 years ago

5.4.2

2 years ago

5.5.0

2 years ago

5.4.1

2 years ago

5.4.0

2 years ago

5.3.1

2 years ago

5.10.0

2 years ago

5.9.0

2 years ago

5.8.1

2 years ago

5.8.0

2 years ago

5.7.1

2 years ago

5.7.0

2 years ago

5.3.0

2 years ago

5.2.0

2 years ago

5.1.2

2 years ago

5.1.1

2 years ago

5.1.0

2 years ago

5.0.0

2 years ago

4.20.6

2 years ago

4.20.7

2 years ago

4.21.1

2 years ago

0.0.1

2 years ago