mirror of
https://github.com/amark/gun.git
synced 2026-03-16 13:25:16 +00:00
use gun for todo list
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule, Injectable } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import Gun from 'gun/gun';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
@@ -14,7 +17,13 @@ import { AppComponent } from './app.component';
|
||||
FormsModule,
|
||||
HttpModule
|
||||
],
|
||||
providers: [],
|
||||
providers: [GunDb],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
|
||||
@Injectable()
|
||||
export class GunDb {
|
||||
|
||||
readonly gun = Gun(location.origin + '/gun');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user