Skip to content
This repository was archived by the owner on Jul 27, 2020. It is now read-only.

Commit 2cc445f

Browse files
committed
fix(Database): Use Injectable decorator for AOT
1 parent afb3327 commit 2cc445f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.DS_Store

8 KB
Binary file not shown.

src/database.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { mergeMap } from 'rxjs/operator/mergeMap';
66
import { map } from 'rxjs/operator/map';
77
import { _do } from 'rxjs/operator/do';
88
import { from } from 'rxjs/observable/from';
9-
import { OpaqueToken, Inject, NgModule, ModuleWithProviders } from '@angular/core';
9+
import { OpaqueToken, Inject, Injectable, NgModule, ModuleWithProviders } from '@angular/core';
1010

1111

1212
const IDB_SUCCESS = 'success';
@@ -41,14 +41,15 @@ export function getIDBFactory(): IDBFactory {
4141
return typeof window !== 'undefined' ? window.indexedDB : self.indexedDB;
4242
}
4343

44+
@Injectable()
4445
export class Database {
4546

4647
public changes: Subject<any> = new Subject();
4748

4849
private _idb: IDBFactory;
4950
private _schema: DBSchema;
5051

51-
constructor(@Inject(DatabaseBackend) idbBackend: IDBFactory, @Inject(IDB_SCHEMA) schema: DBSchema) {
52+
constructor(@Inject(DatabaseBackend) idbBackend: any, @Inject(IDB_SCHEMA) schema: any) {
5253
this._schema = schema;
5354
this._idb = idbBackend;
5455
}

0 commit comments

Comments
 (0)