Skip to content

Commit

Permalink
fix(Database): Use Injectable decorator for AOT
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRyanDev committed Sep 10, 2016
1 parent afb3327 commit 2cc445f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
5 changes: 3 additions & 2 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { mergeMap } from 'rxjs/operator/mergeMap';
import { map } from 'rxjs/operator/map';
import { _do } from 'rxjs/operator/do';
import { from } from 'rxjs/observable/from';
import { OpaqueToken, Inject, NgModule, ModuleWithProviders } from '@angular/core';
import { OpaqueToken, Inject, Injectable, NgModule, ModuleWithProviders } from '@angular/core';


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

@Injectable()
export class Database {

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

private _idb: IDBFactory;
private _schema: DBSchema;

constructor(@Inject(DatabaseBackend) idbBackend: IDBFactory, @Inject(IDB_SCHEMA) schema: DBSchema) {
constructor(@Inject(DatabaseBackend) idbBackend: any, @Inject(IDB_SCHEMA) schema: any) {
this._schema = schema;
this._idb = idbBackend;
}
Expand Down

0 comments on commit 2cc445f

Please sign in to comment.